I am using multer to upload files to AWS s3.For me, after adding client_max_body_size 100M;
into nginx file,I get 400 error. (but the 413 error is gone, this means that it successfully went through nginx and reach your server)
Solution is below:https://stackoverflow.com/a/71240419/15477963
My app.js file did not need to change, and remain like this, which works:
const express = require('express');const bodyParser = require('body-parser');app.use(bodyParser.json());app.use(bodyParser.urlencoded({ extended: true }));