Fix flask send_file arguments
The deprecated attachment_filename was removed in a recent flask release and is superseded by download_name [1]. [1]: https://github.com/pallets/flask/pull/4667
This commit is contained in:
parent
e1b880e203
commit
2015bd3ca6
|
@ -431,4 +431,4 @@ def export_archive(owner_name, list_name):
|
|||
f = open(path, "rb")
|
||||
os.unlink(path)
|
||||
return send_file(f, as_attachment=True,
|
||||
attachment_filename=f"{owner.username}-{list_name}.mbox")
|
||||
download_name=f"{owner.username}-{list_name}.mbox")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from flask import Blueprint, render_template, abort, request, redirect, url_for
|
||||
from flask import current_app, send_file, session
|
||||
from flask import current_app, session
|
||||
from srht.config import cfg
|
||||
from srht.database import db
|
||||
from srht.flask import paginate_query
|
||||
|
|
Loading…
Reference in New Issue