peihsin0715
commited on
Commit
·
a19a694
1
Parent(s):
2c00b52
Fix data saving
Browse files- backend/server.py +2 -2
backend/server.py
CHANGED
|
@@ -61,7 +61,7 @@ def serve_data(filename):
|
|
| 61 |
|
| 62 |
print(f"[Static] Requested file: {filename}")
|
| 63 |
|
| 64 |
-
data_dir = os.path.abspath('data')
|
| 65 |
file_path = os.path.join(data_dir, filename)
|
| 66 |
|
| 67 |
print(f"[Static] Full path: {file_path}")
|
|
@@ -94,7 +94,7 @@ def serve_data(filename):
|
|
| 94 |
@app.route('/debug/files', methods=['GET'])
|
| 95 |
def debug_files():
|
| 96 |
try:
|
| 97 |
-
data_dir = os.path.abspath('data')
|
| 98 |
if not os.path.exists(data_dir):
|
| 99 |
return jsonify({"error": "Data directory not found", "path": data_dir})
|
| 100 |
|
|
|
|
| 61 |
|
| 62 |
print(f"[Static] Requested file: {filename}")
|
| 63 |
|
| 64 |
+
data_dir = os.path.abspath('/tmp/data')
|
| 65 |
file_path = os.path.join(data_dir, filename)
|
| 66 |
|
| 67 |
print(f"[Static] Full path: {file_path}")
|
|
|
|
| 94 |
@app.route('/debug/files', methods=['GET'])
|
| 95 |
def debug_files():
|
| 96 |
try:
|
| 97 |
+
data_dir = os.path.abspath('/tmp/data')
|
| 98 |
if not os.path.exists(data_dir):
|
| 99 |
return jsonify({"error": "Data directory not found", "path": data_dir})
|
| 100 |
|