Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,12 +31,6 @@ os.makedirs(app.config['JSON_FOLDER'], exist_ok=True)
|
|
31 |
os.makedirs(app.config['DATA_FOLDER'], exist_ok=True)
|
32 |
os.makedirs(app.config['MODELS_FOLDER'], exist_ok=True)
|
33 |
|
34 |
-
print("Current user:", os.getuid())
|
35 |
-
print("Upload folder permissions:", os.stat(app.config['UPLOAD_FOLDER']).st_mode)
|
36 |
-
print("Trying to save file:", file_path)
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
# Allowed file extensions
|
41 |
ALLOWED_EXTENSIONS = {'pdf', 'docx', 'rsf', 'odt', 'png', 'jpg', 'jpeg', 'json'}
|
42 |
|
@@ -98,6 +92,9 @@ def upload_file():
|
|
98 |
print("the file 1 ",filename)
|
99 |
file_path = os.path.join(app.config['UPLOAD_FOLDER'], filename)
|
100 |
print("the file path ",file_path)
|
|
|
|
|
|
|
101 |
file.save(file_path)
|
102 |
print("file save in folder")
|
103 |
|
|
|
31 |
os.makedirs(app.config['DATA_FOLDER'], exist_ok=True)
|
32 |
os.makedirs(app.config['MODELS_FOLDER'], exist_ok=True)
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
# Allowed file extensions
|
35 |
ALLOWED_EXTENSIONS = {'pdf', 'docx', 'rsf', 'odt', 'png', 'jpg', 'jpeg', 'json'}
|
36 |
|
|
|
92 |
print("the file 1 ",filename)
|
93 |
file_path = os.path.join(app.config['UPLOAD_FOLDER'], filename)
|
94 |
print("the file path ",file_path)
|
95 |
+
print("Current user:", os.getuid())
|
96 |
+
print("Upload folder permissions:", os.stat(app.config['UPLOAD_FOLDER']).st_mode)
|
97 |
+
print("Trying to save file:", file_path)
|
98 |
file.save(file_path)
|
99 |
print("file save in folder")
|
100 |
|