Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

126
Views
Issue with uploading a file through the multer package

I'm using multer to upload a file through node.js. The file object that is sent from our FE is:

file: FileList
    0: File
    lastModified: 1647806297845
    lastModifiedDate: Sun Mar 20 2022 21:58:17 GMT+0200
    name: "Example Docx.docx"
    size: 12143
    type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
    webkitRelativePath: "

With the input's name attribute 'cv'. My usage of multer is:

const uploadSingleFile = multer.single('cv');

uploadSingleFile(req, res, (err) => {
    if (err) {
        next(err);
    }
    next();
});

Yet I don't get any file in req.file

What am I missing?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The issue wad resolved by sending file[0] to multer.

It appears it's not designed to handle the FileList object in the scanario above.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!