Archive download name

This commit is contained in:
Thomas Forgione 2024-07-22 14:36:55 +02:00
parent d499a8b279
commit 48e1f82bc7
1 changed files with 5 additions and 1 deletions

6
app.py
View File

@ -314,7 +314,11 @@ def download_object(id: int):
yield b'\x00' * (512 - bytes_len % 512)
return app.response_class(generate(), mimetype='application/x-tar')
return app.response_class(
generate(),
mimetype='application/x-tar',
headers={'Content-Disposition': 'attachment; filename="archive.tar"'}
)
@app.route('/static/<path:path>')