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

89
Views
Files are only sent with postman but not with file input

When I send a file through the form, I get req.file is undefined. But through Postman, I get the file. Why?

<form action="/up" method="POST" enctype="multipart/form-data" class="row">

            <section class="col-md-8 border mt-2">

                <label for="name" class="form-label">Name</label>
                <input type="text" class="form-control" name="name" id="name">
              
                <label for="csv" class="form-label">CSV File</label>
                <input type="file" id="csv" name="csv" accept=".csv">
                                          
                <label for="rounds" class="form-label">Rounds</label>
                <input type="number" class="form-control" id="rounds" name="rounds" min="0">          

                <button type="submit" class="btn btn-primary mb-3">Guardar</button>
                <button  class="btn btn-warning mb-3">Cancelar</button>
      

Route

router.post('/up', upCSV.single('csv'), newCamp);

Multer Middleware

const storage = multer.memoryStorage();       
const upload = multer({ storage: storage});

Files are only sent with Postman but not with file input.

about 4 years ago · Juan Pablo Isaza
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!