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:
Thorben Günther 2022-09-26 13:43:43 +02:00 committed by Drew DeVault
parent ec4fdf350d
commit 4827e61f97
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ def export_POST(owner, name):
f = open(ntf.name, "rb")
return send_file(f, as_attachment=True,
attachment_filename=f"{tracker.owner.username}-{tracker.name}.json.gz",
download_name=f"{tracker.owner.username}-{tracker.name}.json.gz",
mimetype="application/gzip")
@settings.route("/<owner>/<name>/settings/import", methods=["POST"])