Question
FastAPI file upload endpoint crashes on startup: Form data requires python-multipart
Added an upload endpoint with UploadFile and now the app won't even start:
I did pip install multipart. Still the same.
What I’ve tried
pip install multipart, restarted the repl twice.
Which package did you install exactly?
grace_mw
2 answers
On Replit, add it via the Packages tool (or poetry add python-multipart / uv add, depending on the template) so it ends up in the project file. Installing with plain pip in the shell can disappear when the environment is rebuilt.