Spaces:
Build error
Build error
Commit
·
75cd628
1
Parent(s):
fafbcc3
update
Browse files
app.py
CHANGED
|
@@ -263,7 +263,7 @@ def completed(username):
|
|
| 263 |
def send_visualization(filename):
|
| 264 |
logger.info(f"Attempting to serve file: {filename}")
|
| 265 |
# Ensure the path is safe and doesn't allow access to files outside the intended directory
|
| 266 |
-
safe_path =
|
| 267 |
directory = os.path.dirname(safe_path)
|
| 268 |
file_name = os.path.basename(safe_path)
|
| 269 |
logger.info(f"Serving file from directory: {directory}, filename: {file_name}")
|
|
|
|
| 263 |
def send_visualization(filename):
|
| 264 |
logger.info(f"Attempting to serve file: {filename}")
|
| 265 |
# Ensure the path is safe and doesn't allow access to files outside the intended directory
|
| 266 |
+
safe_path = os.path.join(os.getcwd(), filename)
|
| 267 |
directory = os.path.dirname(safe_path)
|
| 268 |
file_name = os.path.basename(safe_path)
|
| 269 |
logger.info(f"Serving file from directory: {directory}, filename: {file_name}")
|