esteele commited on
Commit
59904b6
·
1 Parent(s): 60a515a

Edit upload folder path

Browse files
Files changed (1) hide show
  1. app/utils/file_utils.py +3 -2
app/utils/file_utils.py CHANGED
@@ -15,9 +15,10 @@ from fastapi import UploadFile
15
 
16
 
17
  # Use ./data/uploads for writable folder inside Hugging Face Spaces
18
- UPLOAD_DIR = "./data/uploads"
19
  os.makedirs(UPLOAD_DIR, exist_ok=True)
20
 
 
21
  def save_upload_file(file: UploadFile) -> str:
22
  """
23
  Save an uploaded file to the UPLOAD_DIR
@@ -29,4 +30,4 @@ def save_upload_file(file: UploadFile) -> str:
29
  with open(file_path, "wb") as buffer:
30
  shutil.copyfileobj(file.file, buffer)
31
 
32
- return file_path
 
15
 
16
 
17
  # Use ./data/uploads for writable folder inside Hugging Face Spaces
18
+ UPLOAD_DIR = "./uploads"
19
  os.makedirs(UPLOAD_DIR, exist_ok=True)
20
 
21
+
22
  def save_upload_file(file: UploadFile) -> str:
23
  """
24
  Save an uploaded file to the UPLOAD_DIR
 
30
  with open(file_path, "wb") as buffer:
31
  shutil.copyfileobj(file.file, buffer)
32
 
33
+ return file_path