NameIsJACK commited on
Commit
7e370cd
·
1 Parent(s): 0643755
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -33,7 +33,7 @@ async def read_root():
33
  return html_content.format(file_list=file_list)
34
 
35
  @app.post("/uploadfile/")
36
- async def upload_file(file: UploadFile = File(...), background_tasks: BackgroundTasks):
37
  # Save the uploaded file to the uploads directory
38
  upload_directory = "uploads"
39
  os.makedirs(upload_directory, exist_ok=True) # Create the directory if it doesn't exist
 
33
  return html_content.format(file_list=file_list)
34
 
35
  @app.post("/uploadfile/")
36
+ async def upload_file(background_tasks: BackgroundTasks,file: UploadFile = File(...)):
37
  # Save the uploaded file to the uploads directory
38
  upload_directory = "uploads"
39
  os.makedirs(upload_directory, exist_ok=True) # Create the directory if it doesn't exist