diff options
| author | jfriedli | 2019-10-03 04:29:42 -0700 |
|---|---|---|
| committer | jfriedli | 2019-10-03 04:29:42 -0700 |
| commit | f544d94a8c903dcdc9f576af32958334b4a2a71c (patch) | |
| tree | 610537b4a3a31313f4924bb5263d8a5164ce5eea /main.py | |
| parent | c36fc9c20e3ec31359f8a77e1bdfb8ade3f0384c (diff) | |
Content disposition header
Diffstat (limited to '')
| -rw-r--r-- | main.py | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -50,7 +50,7 @@ def create_app(test_config=None): | |||
| 50 | def remove_file(response): | 50 | def remove_file(response): |
| 51 | os.remove(complete_path) | 51 | os.remove(complete_path) |
| 52 | return response | 52 | return response |
| 53 | return send_from_directory(app.config['UPLOAD_FOLDER'], filepath) | 53 | return send_from_directory(app.config['UPLOAD_FOLDER'], filepath, as_attachment=True) |
| 54 | 54 | ||
| 55 | @app.route('/', methods=['GET', 'POST']) | 55 | @app.route('/', methods=['GET', 'POST']) |
| 56 | def upload_file(): | 56 | def upload_file(): |
| @@ -180,7 +180,7 @@ def create_app(test_config=None): | |||
| 180 | os.remove(complete_path) | 180 | os.remove(complete_path) |
| 181 | return response | 181 | return response |
| 182 | 182 | ||
| 183 | return send_from_directory(app.config['UPLOAD_FOLDER'], filepath) | 183 | return send_from_directory(app.config['UPLOAD_FOLDER'], filepath, as_attachment=True) |
| 184 | 184 | ||
| 185 | class APIBulkDownloadCreator(Resource): | 185 | class APIBulkDownloadCreator(Resource): |
| 186 | schema = { | 186 | schema = { |
