mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-05-10 18:25:03 -04:00
Content disposition header
This commit is contained in:
parent
c36fc9c20e
commit
f544d94a8c
2 changed files with 4 additions and 2 deletions
4
main.py
4
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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue