I am trying to post a lot of data to my sails API and I get this 413 error:
Unable to parse HTTP body- error occurred - Error: request entity too large
I have tried a lot of solutions suggested in differents discussions but it never works and seems to be for previous sails version. (it’s always about changing the bodyParser options)
Does anybody know the correct syntax for sails 0.10.5? Thanks a lot!
Does anybody know the correct syntax for sails 0.10.5? Thanks a lot!
Take a look at this resolution (sails v.0.11.0, config/http.js):
module.exports.http = {
middleware: { ... },
bodyParser: function(){
var opts = {
limit:'10mb'
}
return require('./../node_modules/sails/node_modules/skipper')(opts);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With