← Back to all fixes
413 Request Entity Too Large on file upload
The Issue
Users trying to upload files get 413 Request Entity Too Large.
Root Cause
Nginx has a default `client_max_body_size` of 1MB. Any upload larger than this is rejected before it reaches your app.
How to Fix
Increase the limit in nginx.conf inside the `server` or `location` block: `client_max_body_size 50M;`Reload nginx: `sudo systemctl reload nginx`Also check if your app framework has its own body size limit (Express: `express.json({ limit: "50mb" })`)