Reputation: 1969
I uploaded an Image of size 413kb and whenever I convert to base64string and send it over to nodejs server, I got a payload too large
error with 413
error code.
Does it mean that the size of base64string is not dependent on the size of image converted. Articles found only stated that base64string is 1.3333 time bigger than actual size, but how is 413kb
a payload too large
.
Already did this but didn't solve the issue.
app.use(bodyParser.json({limit: "9091990mb"}));
app.use(bodyParser.urlencoded({limit: "9091990mb", extended: true, parameterLimit:90000}));
app.use(fileUpload({
limits: { fileSize: 50 * 1024 * 1024 },
}));
Upvotes: 1
Views: 1269
Reputation: 76
In my case I noticed I had the following lines of code:
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
So, what I did was comment the lines (or remove it) and it worked just fine.
Upvotes: 2