Spaces:
Running
Running
Update app_main.py
Browse files- app_main.py +2 -2
app_main.py
CHANGED
@@ -515,14 +515,14 @@ def download_sb3(project_id):
|
|
515 |
Allows users to download the generated .sb3 Scratch project file.
|
516 |
"""
|
517 |
sb3_filename = f"{project_id}.sb3"
|
518 |
-
sb3_filepath = os.path.join("
|
519 |
|
520 |
try:
|
521 |
if os.path.exists(sb3_filepath):
|
522 |
logger.info(f"Serving SB3 file for project ID: {project_id}")
|
523 |
# send_from_directory serves the file and handles content-disposition for download
|
524 |
return send_from_directory(
|
525 |
-
directory="
|
526 |
path=sb3_filename,
|
527 |
as_attachment=True, # This makes the browser download the file
|
528 |
download_name=sb3_filename # This sets the filename for the download
|
|
|
515 |
Allows users to download the generated .sb3 Scratch project file.
|
516 |
"""
|
517 |
sb3_filename = f"{project_id}.sb3"
|
518 |
+
sb3_filepath = os.path.join("game_samples", sb3_filename)
|
519 |
|
520 |
try:
|
521 |
if os.path.exists(sb3_filepath):
|
522 |
logger.info(f"Serving SB3 file for project ID: {project_id}")
|
523 |
# send_from_directory serves the file and handles content-disposition for download
|
524 |
return send_from_directory(
|
525 |
+
directory="game_samples",
|
526 |
path=sb3_filename,
|
527 |
as_attachment=True, # This makes the browser download the file
|
528 |
download_name=sb3_filename # This sets the filename for the download
|