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

121
Views
Problema al cargar un archivo a través del paquete multer

Estoy usando multer para cargar un archivo a través de node.js El objeto de archivo que se envía desde nuestra FE es:

 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: "

Con el atributo de name de entrada 'cv' . Mi uso de multer es:

 const uploadSingleFile = multer.single('cv'); uploadSingleFile(req, res, (err) => { if (err) { next(err); } next(); });

Sin embargo, no obtengo ningún archivo en req.file

¿Qué me estoy perdiendo?

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

0

El problema se resolvió enviando file[0] a multer .

Parece que no está diseñado para manejar el objeto FileList en el scanario anterior.

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!