DEV Community

Nagarajan R
Nagarajan R

Posted on

Answer: Uploading multiple files with multer, but from different fields?

What you want is upload.fields():

app.post('/rest/upload',
         upload.fields([{
           name: 'video', maxCount: 1
         }, {
           name: 'subtitles', maxCount: 1
         }]), function(req, res, next){
  // ...
}

Top comments (0)