I am trying to upload files through my web app using the following code.
View:
I take the chance and assume you are using bodyParser
as middleware. bodyParser has a default limit
of 100kb. Look at node_modules/body-parser/lib/types/urlencoded.js
:
var limit = typeof options.limit !== 'number'
? bytes(options.limit || '100kb')
: options.limit
You can change the limit in your app.js
by
var bodyParser = require('body-parser');
...
app.use(bodyParser.urlencoded( { limit: 1048576 } )); //1mb