feat(api): Report file size to user (#77 - @AaronBenDaniel)
This commit is contained in:
+2
-1
@@ -218,7 +218,8 @@ async def handle_download(
|
|||||||
iterfile(),
|
iterfile(),
|
||||||
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.value}"' # 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
|
||||||
|
"Content-Length": str(book_buffer.getbuffer().nbytes),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user