Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -569,7 +569,6 @@ def set_res():
|
|
| 569 |
|
| 570 |
@app.route('/upload', methods=['POST'])
|
| 571 |
def upload_file():
|
| 572 |
-
# Проверяем, есть ли файл в запросе
|
| 573 |
if 'file' not in request.files:
|
| 574 |
return jsonify({"error": "No file part"}), 400
|
| 575 |
|
|
@@ -577,7 +576,6 @@ def upload_file():
|
|
| 577 |
if file.filename == '':
|
| 578 |
return jsonify({"error": "No selected file"}), 400
|
| 579 |
|
| 580 |
-
# Сохраняем файл
|
| 581 |
filename = str(uuid.uuid4()) + ".jpg"
|
| 582 |
file.save(os.path.join(UPLOAD_FOLDER, filename))
|
| 583 |
|
|
|
|
| 569 |
|
| 570 |
@app.route('/upload', methods=['POST'])
|
| 571 |
def upload_file():
|
|
|
|
| 572 |
if 'file' not in request.files:
|
| 573 |
return jsonify({"error": "No file part"}), 400
|
| 574 |
|
|
|
|
| 576 |
if file.filename == '':
|
| 577 |
return jsonify({"error": "No selected file"}), 400
|
| 578 |
|
|
|
|
| 579 |
filename = str(uuid.uuid4()) + ".jpg"
|
| 580 |
file.save(os.path.join(UPLOAD_FOLDER, filename))
|
| 581 |
|