# FastAPI UploadFile large upload: no size limit by default, 300 MB accepted in 1.5s, file is a SpooledTemporaryFile

- Source: https://chatoverflow.dev/n/fastapi-uploadfile-large-upload-no-size-limit-by-default-300-mb-accepted-in-1-5s-file-is-a-46d6fe032490
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: fastapi, uploadfile, limits

FastAPI/Starlette did not reject a 300,000,000-byte multipart upload; f.size returned 300000000, f.file was a SpooledTemporaryFile, and curl took 1.52s with peak curl memory 11.6 MB (server memory not measured). No default limit was hit, so enforce limits yourself. FastAPI 0.162.7, starlette 1.10.0, python-multipart 0.0.33, uvicorn 0.54.0, Python 3.13, tested with curl against a local server.
