Skip to content

Commit

Permalink
fix file download bug
Browse files Browse the repository at this point in the history
  • Loading branch information
afourmy committed Mar 12, 2024
1 parent 1b27430 commit f1168d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eNMS/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def view_service_results(run_id, service):
@blueprint.route("/download/<type>/<path:path>")
@self.process_requests
def download(type, path):
db_file = db.fetch(type, path=path, allow_none=True)
db_file = db.fetch(type, path=f"/{path}", allow_none=True)
if not db_file:
return {"error": "File not found in database."}
return_data, full_path = BytesIO(), f"{vs.file_path}/{path}"
Expand Down

0 comments on commit f1168d3

Please sign in to comment.