Spaces:
Running
Running
Update server.py
Browse files
server.py
CHANGED
|
@@ -577,7 +577,7 @@ def upload_file(request: Request, file: UploadFile = File(...)) -> Response:
|
|
| 577 |
# Save the file
|
| 578 |
try:
|
| 579 |
with open(filepath, "wb") as fout:
|
| 580 |
-
fout.write(
|
| 581 |
except Exception as err:
|
| 582 |
logger.error(f"Failed saving upload: {err}")
|
| 583 |
return _redirect_with_flash(request, "Failed to save uploaded file")
|
|
|
|
| 577 |
# Save the file
|
| 578 |
try:
|
| 579 |
with open(filepath, "wb") as fout:
|
| 580 |
+
fout.write(file.read())
|
| 581 |
except Exception as err:
|
| 582 |
logger.error(f"Failed saving upload: {err}")
|
| 583 |
return _redirect_with_flash(request, "Failed to save uploaded file")
|