What you want is upload.fields()
:
app.post('/rest/upload',
upload.fields([{
name: 'video', maxCount: 1
}, {
name: 'subtitles', maxCount: 1
}]), function(req, res, next){
// ...
}
More Related Contents:
- Cannot app.use(multer). “requires middleware function” error
- Uploading image to amazon s3 using multer-s3 nodejs
- ENOENT: no such file or directory .?
- How to store a file with file extension with multer?
- Unable to delete data from mongoDB
- node.js require() cache – possible to invalidate?
- Local dependency in package.json
- How to set environment variables from within package.json?
- “message failed to fetch from registry” while trying to install any module
- npm ERR! Error: EPERM: operation not permitted, rename
- How to display the lastmessage sent when user is not inside the chat?
- Error installing bcrypt with npm
- How to remove module after “require” in node.js?
- Node.js + Joi how to display a custom error messages?
- Meteor Subscribe doesn’t update sort order of collection
- How to setup an authentication middleware in Express.js
- Automatically start forever (node) on system restart
- Parsing a CSV file using NodeJS [closed]
- Differences between express.Router and app.get?
- Mongoose optional search query parameters?
- The engine “node” is incompatible with this module
- Message “the term ‘ng’ is not recognized as the name of a cmdlet”
- How to restore/reset npm configuration to default values?
- node-websocket-server: possible to have multiple, separate “broadcasts” for a single node.js process?
- NPM installs dependencies in a wrong place
- bower command not found
- Obtaining the hash of a file using the stream capabilities of crypto module (ie: without hash.update and hash.digest)
- Displaying an image with EJS in node.js/express
- Permission denied when installing npm modules in OSX
- node.js, Error: Cannot find module ‘express’