Kareman commited on
Commit
fee92ad
·
1 Parent(s): ad4c9f3
Files changed (1) hide show
  1. app/main.py +1 -1
app/main.py CHANGED
@@ -56,7 +56,7 @@ def protected_route(current_user: User = Depends(get_current_user)):
56
  @app.post("/upload")
57
  def upload_file(file: UploadFile = File(...), current_user: User = Depends(get_current_user)):
58
  user_id = current_user.username
59
- file_path = f"./uploads/{file.filename}"
60
  with open(file_path, "wb") as f:
61
  shutil.copyfileobj(file.file, f)
62
  rag.add_document(file_path, user_id=user_id)
 
56
  @app.post("/upload")
57
  def upload_file(file: UploadFile = File(...), current_user: User = Depends(get_current_user)):
58
  user_id = current_user.username
59
+ file_path = f"/tmp/uploads/{file.filename}"
60
  with open(file_path, "wb") as f:
61
  shutil.copyfileobj(file.file, f)
62
  rag.add_document(file_path, user_id=user_id)