DmitrMakeev
commited on
Commit
•
2138b6a
1
Parent(s):
acabb34
Update app.py
Browse files
app.py
CHANGED
@@ -118,8 +118,8 @@ def upload_file():
|
|
118 |
save_path = os.path.join(UPLOAD_FOLDER, unique_filename)
|
119 |
file.save(save_path)
|
120 |
|
121 |
-
# Возвращаем полный URL загруженного файла
|
122 |
-
full_url = request.url_root + 'image/' + unique_filename
|
123 |
return f"File uploaded successfully and saved to {full_url}", 200
|
124 |
|
125 |
@app.route('/image/<filename>', methods=['GET'])
|
|
|
118 |
save_path = os.path.join(UPLOAD_FOLDER, unique_filename)
|
119 |
file.save(save_path)
|
120 |
|
121 |
+
# Возвращаем полный URL загруженного файла с протоколом https
|
122 |
+
full_url = request.url_root.replace('http://', 'https://') + 'image/' + unique_filename
|
123 |
return f"File uploaded successfully and saved to {full_url}", 200
|
124 |
|
125 |
@app.route('/image/<filename>', methods=['GET'])
|