tecuts commited on
Commit
036b1fb
·
verified ·
1 Parent(s): b74c9bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -195,8 +195,7 @@ def download_track(request: DownloadRequest):
195
  # Return the download URL
196
  relative_path = os.path.relpath(filepath, "downloads")
197
  # Remove spaces from the relative path
198
- relative_path = relative_path.replace(" ", "%20")
199
- download_url = f"{BASE_URL}/downloads/{relative_path}"
200
  logger.info(f"Download successful: {download_url}")
201
  return {"download_url": download_url}
202
  except Exception as e:
 
195
  # Return the download URL
196
  relative_path = os.path.relpath(filepath, "downloads")
197
  # Remove spaces from the relative path
198
+ download_url = f"{BASE_URL}/downloads/{quote(str({relative_path}))}"
 
199
  logger.info(f"Download successful: {download_url}")
200
  return {"download_url": download_url}
201
  except Exception as e: