mirror of
https://github.com/flibusta-apps/fb2converter_server.git
synced 2026-03-03 07:00:50 +01:00
Add buffered uploaded file read
This commit is contained in:
@@ -35,8 +35,7 @@ async def convert(
|
|||||||
converted_temp_filename = str(temp_uuid) + "." + format
|
converted_temp_filename = str(temp_uuid) + "." + format
|
||||||
|
|
||||||
async with aiofiles.open(temp_filename, "wb") as f:
|
async with aiofiles.open(temp_filename, "wb") as f:
|
||||||
content = await file.read()
|
while (content := await file.read(1024)):
|
||||||
|
|
||||||
if isinstance(content, str):
|
if isinstance(content, str):
|
||||||
content = content.encode()
|
content = content.encode()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user