Add partition download_name

This commit is contained in:
augustin64 2022-10-03 20:45:10 +02:00
parent f34ffa205e
commit 7b0566fbff
2 changed files with 8 additions and 2 deletions

View File

@ -97,7 +97,10 @@ def partition(album_uuid, partition_uuid):
if partition is None:
return abort(404)
return send_file(os.path.join("partitions", f"{partition_uuid}.pdf"))
return send_file(
os.path.join("partitions", f"{partition_uuid}.pdf"),
download_name = f"{partition['name']}.pdf"
)
@bp.route("/create-album", methods=["GET", "POST"])

View File

@ -26,7 +26,10 @@ def partition(uuid):
if partition is None:
abort(404)
return send_file(os.path.join("partitions", f"{uuid}.pdf"))
return send_file(
os.path.join("partitions", f"{uuid}.pdf"),
download_name = f"{partition['name']}.pdf"
)
@bp.route("/search/<uuid>")