balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.83k stars 1.95k forks source link

Skipper: Not being able to configure bodyParser limit from http.js file #4708

Open kiranattilicho opened 5 years ago

kiranattilicho commented 5 years ago

As suggested in the documentation here: https://sailsjs.com/documentation/reference/configuration/sails-config-http#?configuring-skipper, I did uncomment the configuration as follows,

module.exports.http = {

middleware: {

order: [
   'cookieParser',
   'session',
   'bodyParser',
   'compress',
   'poweredBy',
   'router',
   'www',
   'favicon',
 ],

bodyParser: (function _configureBodyParser(){
   var skipper = require('skipper');
   var middlewareFn = skipper(
     {
       strict: true,
       limit: '50mb'
     }
     );
   return middlewareFn;
})(),

},

};

Even after this, I am not being able to upload files which are more than 1 MB.

Skipper Version being used: "sails": "^1.0.2" Sails version being used: "skipper": "^0.8.7"

sailsbot commented 5 years ago

@kiranattilicho Thanks for posting, we'll take a look as soon as possible. In the meantime, if you haven’t already, please carefully read the issue contribution guidelines and double-check for any missing information above. In particular, please ensure that this issue is about a stability or performance bug with a documented feature; and make sure you’ve included detailed instructions on how to reproduce the bug from a clean install. Finally, don’t forget to include the version of Node.js you tested with, as well as your version of Sails or Waterline, and of any relevant standalone adapters/generators/hooks.

Thank you!


For help with questions about Sails, click here. If you’re interested in hiring @sailsbot and her Austin-based minions, click here.

raqem commented 5 years ago

Hi @kiranattilicho, Just wanted to give you a heads up that we are moving all open Sails issues into one repo. ~Cheers!

raqem commented 5 years ago

Hi @kiranattilicho, I was looking into the docs and it appears that limit is not listed as available to configure in the bodyParser. Have you been able to add maxBytes: 3000000 to your actions to control the size of your uploads?