Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Unable to upload file on nginx with Ubuntu 20.04 and nodejs
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 clientmaxbodysize and clientbodybuffersize to larger values, disabling proxyrequestbuffering, 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?