alexander1010 commited on
Commit
eeb09ee
·
verified ·
1 Parent(s): 4598d0e

"fix: use /tmp for audio storage in Hugging Face"

Browse files
src/expon/presentation/infrastructure/services/storage/local_storage_service.py CHANGED
@@ -5,12 +5,11 @@ from pathlib import Path
5
  import shutil
6
 
7
  class LocalStorageService:
8
- def __init__(self, base_path: str = "storage/audio"):
9
  self.base_path = base_path
10
- os.makedirs(self.base_path, exist_ok=True)
11
 
12
  def save(self, file: UploadFile) -> str:
13
-
14
  filename = f"{uuid4()}_{file.filename}"
15
  file_path = os.path.join(self.base_path, filename)
16
 
 
5
  import shutil
6
 
7
  class LocalStorageService:
8
+ def __init__(self, base_path: str = "/tmp/storage/audio"):
9
  self.base_path = base_path
10
+ os.makedirs(self.base_path, exist_ok=True) # 👈 Crea /tmp/storage/audio si no existe
11
 
12
  def save(self, file: UploadFile) -> str:
 
13
  filename = f"{uuid4()}_{file.filename}"
14
  file_path = os.path.join(self.base_path, filename)
15