muryshev commited on
Commit
08bb8bf
·
1 Parent(s): 86c402d
Files changed (1) hide show
  1. components/services/document.py +1 -1
components/services/document.py CHANGED
@@ -89,7 +89,7 @@ class DocumentService:
89
 
90
  self.dataset_service.raise_if_processing()
91
 
92
- file_location = Path.cwd() / 'tmp' / file.filename
93
  file_location.parent.mkdir(parents=True, exist_ok=True)
94
  with open(file_location, 'wb') as buffer:
95
  buffer.write(file.file.read())
 
89
 
90
  self.dataset_service.raise_if_processing()
91
 
92
+ file_location = Path(os.environ.get("APP_TMP_PATH", '.')) / 'tmp' / file.filename
93
  file_location.parent.mkdir(parents=True, exist_ok=True)
94
  with open(file_location, 'wb') as buffer:
95
  buffer.write(file.file.read())