mohhhhhit commited on
Commit
2a241eb
·
verified ·
1 Parent(s): f3a790d

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -558,12 +558,11 @@ def process_heavy_files_background(space_id: str, saved_file_paths: List[Dict]):
558
  except Exception as e:
559
  print(f"Background processing failed: {e}")
560
 
561
- @app.post("/api/spaces/{space_id}/upload")
562
  @app.post("/api/spaces/{space_id}/upload")
563
  async def upload_files(
564
  space_id: str,
565
  background_tasks: BackgroundTasks,
566
- files: List[UploadFile] = File(...)
567
  ):
568
  """Accepts files quickly and processes them in the background"""
569
  try:
@@ -596,6 +595,7 @@ async def upload_files(
596
 
597
  except Exception as e:
598
  raise HTTPException(status_code=500, detail=str(e))
 
599
  @app.get("/api/spaces/{space_id}/files")
600
  async def get_files(space_id: str):
601
  """Get processed files for a space from MongoDB"""
 
558
  except Exception as e:
559
  print(f"Background processing failed: {e}")
560
 
 
561
  @app.post("/api/spaces/{space_id}/upload")
562
  async def upload_files(
563
  space_id: str,
564
  background_tasks: BackgroundTasks,
565
+ files: list[UploadFile] # <-- Lowercase 'list', no '= File(...)'
566
  ):
567
  """Accepts files quickly and processes them in the background"""
568
  try:
 
595
 
596
  except Exception as e:
597
  raise HTTPException(status_code=500, detail=str(e))
598
+
599
  @app.get("/api/spaces/{space_id}/files")
600
  async def get_files(space_id: str):
601
  """Get processed files for a space from MongoDB"""