I am getting 'Entity Too large' while post json in node js. My expreess js version is 4.16.1.
I am gone through all answer from this thread https://stackoverflow.com/questions/19917401/error-request-entity-too-large
I am getting 'Entity Too large' while post json in node js. My expreess js version is 4.16.1.
I am gone through all answer from this thread https://stackoverflow.com/questions/19917401/error-request-entity-too-large
After So many try I got my solution
I have commented this line
app.use(bodyParser.json());
and I put app.use(bodyParser.json({limit: '50mb'}))
Than it works
Add this parameter as middle ware in your main js file
var express = require('express');
var app = express();
app.use(express.json({limit: 1024102420}));
app.use( bodyParser.json({parameterLimit: 50000,limit:1024102420,type:'application/json'}) ); // to support JSON-encoded bodies
app.use(bodyParser.urlencoded({parameterLimit: 50000, limit: 1024102420, // to support URL-encoded bodies
extended: true
}));