Spaces:
Sleeping
Sleeping
DmitrMakeev
commited on
Commit
•
f381854
1
Parent(s):
21d8c53
Update app.py
Browse files
app.py
CHANGED
@@ -118,7 +118,9 @@ def upload_file():
|
|
118 |
save_path = os.path.join(UPLOAD_FOLDER, unique_filename)
|
119 |
file.save(save_path)
|
120 |
|
121 |
-
|
|
|
|
|
122 |
|
123 |
@app.route('/image/<filename>', methods=['GET'])
|
124 |
def get_image(filename):
|
|
|
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'])
|
126 |
def get_image(filename):
|