send files as attachment

This commit is contained in:
Denis Lehmann 2022-06-11 12:14:14 +02:00
parent 6d420ab85a
commit fc215ad2ac

View file

@ -85,7 +85,9 @@ def create_app(base_path, cloud_name="raincloud"):
else:
if config["download"] and filename != "rc.conf":
return send_from_directory(
dh.get_absolute_path(directory), filename
dh.get_absolute_path(directory),
filename,
as_attachment=True,
)
else:
abort(404)