fix(api): Download formats including Enum class name

This commit is contained in:
TheOnlyWayUp
2024-12-06 11:29:53 +00:00
parent 52c55227b2
commit 12b022e780
+1 -1
View File
@@ -193,7 +193,7 @@ async def handle_download(
BytesIO(book_bytes), BytesIO(book_bytes),
media_type=media_type, media_type=media_type,
headers={ headers={
"Content-Disposition": f'attachment; filename="{slugify(metadata["title"])}_{story_id}{"_images" if download_images else ""}.{format}"' # Thanks https://stackoverflow.com/a/72729058 "Content-Disposition": f'attachment; filename="{slugify(metadata["title"])}_{story_id}{"_images" if download_images else ""}.{format.value}"' # Thanks https://stackoverflow.com/a/72729058
}, },
) )