mirror of
https://github.com/clearml/clearml-server
synced 2025-02-25 13:43:32 +00:00
Support download flag
This commit is contained in:
parent
7dcc0f6df2
commit
018582ff8a
@ -36,7 +36,8 @@ def upload():
|
||||
|
||||
@app.route("/<path:path>", methods=["GET"])
|
||||
def download(path):
|
||||
response = send_from_directory(app.config["UPLOAD_FOLDER"], path)
|
||||
as_attachment = "download" in request.args
|
||||
response = send_from_directory(app.config["UPLOAD_FOLDER"], path, as_attachment=as_attachment)
|
||||
if config.get("fileserver.download.disable_browser_caching", False):
|
||||
headers = response.headers
|
||||
headers["Pragma-directive"] = "no-cache"
|
||||
|
Loading…
Reference in New Issue
Block a user