I’m trying to upload files from an app to a nodejs api on digital ocean using nginx as a reverse proxy. I’m using multer to upload form-data, and it works well in my local environment, so I suppose the problem is with nginx.
I have tried various configurations for nginx.conf and the configuration file at /etc/nginx/sites-available/ (setting client_max_body_size and client_body_buffer_size to larger values, disabling proxy_request_buffering, etc), and even tried the whole process with a 60kb file. I’m not getting the 413 error, so setting larger values for some nginx config variables did work, but the file never appears inside the req object (which multer was supposed to extract).
Any tips on how to solve this problem?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!