send files as attachment
This commit is contained in:
parent
6d420ab85a
commit
fc215ad2ac
1 changed files with 3 additions and 1 deletions
|
|
@ -85,7 +85,9 @@ def create_app(base_path, cloud_name="raincloud"):
|
||||||
else:
|
else:
|
||||||
if config["download"] and filename != "rc.conf":
|
if config["download"] and filename != "rc.conf":
|
||||||
return send_from_directory(
|
return send_from_directory(
|
||||||
dh.get_absolute_path(directory), filename
|
dh.get_absolute_path(directory),
|
||||||
|
filename,
|
||||||
|
as_attachment=True,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue