hagras commited on
Commit
277f74b
·
verified ·
1 Parent(s): fddf765

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +1 -1
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(await 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")
 
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")