Implement upload_file endpoint (#550)

This commit is contained in:
Kerem Yilmaz
2024-07-03 18:33:01 -07:00
committed by GitHub
parent c8a1158b4b
commit 80c7c43bd6

View File

@@ -763,7 +763,7 @@ async def validate_file_size(file: UploadFile) -> UploadFile:
if size > app.SETTINGS_MANAGER.MAX_UPLOAD_FILE_SIZE:
raise HTTPException(
status_code=413,
detail=f"File size exceeds the maximum allowed size ({app.SETTINGS_MANAGER.MAX_UPLOAD_FILE_SIZE} bytes)",
detail=f"File size exceeds the maximum allowed size ({app.SETTINGS_MANAGER.MAX_UPLOAD_FILE_SIZE/1024/1024} MB)",
)
return file