From f544d94a8c903dcdc9f576af32958334b4a2a71c Mon Sep 17 00:00:00 2001 From: jfriedli Date: Thu, 3 Oct 2019 04:29:42 -0700 Subject: Content disposition header --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index a4766b1..2309bf8 100644 --- a/main.py +++ b/main.py @@ -50,7 +50,7 @@ def create_app(test_config=None): def remove_file(response): os.remove(complete_path) return response - return send_from_directory(app.config['UPLOAD_FOLDER'], filepath) + return send_from_directory(app.config['UPLOAD_FOLDER'], filepath, as_attachment=True) @app.route('/', methods=['GET', 'POST']) def upload_file(): @@ -180,7 +180,7 @@ def create_app(test_config=None): os.remove(complete_path) return response - return send_from_directory(app.config['UPLOAD_FOLDER'], filepath) + return send_from_directory(app.config['UPLOAD_FOLDER'], filepath, as_attachment=True) class APIBulkDownloadCreator(Resource): schema = { -- cgit v1.3