Skip to content

Commit

Permalink
fix file too large message (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmkazantsev authored Feb 16, 2023
1 parent 0ab2ced commit a0bdb49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion print_service/routes/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async def upload_file(
async with aiofiles.open(path, 'wb') as saved_file:
memory_file = await file.read()
if len(memory_file) > settings.MAX_SIZE:
raise HTTPException(415, f'File too large, {settings.MAX_SIZE} bytes allowed')
raise HTTPException(413, f'Content too large, {settings.MAX_SIZE} bytes allowed')
await saved_file.write(memory_file)
if not check_pdf_ok(memory_file):
await aiofiles.os.remove(path)
Expand Down

0 comments on commit a0bdb49

Please sign in to comment.