I am trying to upload file using connect-multiparty with reference of connect-multiparty below is my express.js config for that.
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());
//file upload configuration
app.use(multipart({
uploadDir: config.tmp
}));
but when I upload file than it gives me request size if too long. I search for this and found that I need to set limit so I have also put limit parameter like below:
app.use(bodyParser.json({limit:'50mb'}));
but after that I start getting Invalid json error. than I found that bodyParser could not parse multi-part data. but i don't know how can i use multipart middleware to parse multi-part data.