Add buffered uploaded file read

This commit is contained in:
2022-03-02 23:11:38 +03:00
parent 63be8fda4f
commit 2795f9b5fd

View File

@@ -35,12 +35,11 @@ async def convert(
converted_temp_filename = str(temp_uuid) + "." + format
async with aiofiles.open(temp_filename, "wb") as f:
content = await file.read()
while (content := await file.read(1024)):
if isinstance(content, str):
content = content.encode()
if isinstance(content, str):
content = content.encode()
await f.write(content)
await f.write(content)
proc = await asyncio.create_subprocess_exec(
"./bin/fb2c",