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

138
Views
Uploading Multiple Files with Busboy in ExpressJS Application

I have the following server code to receive multiple files at once using busboy:

  ..... 
        req.busboy.on('files', (files) => files.map((x) => {
            let filename = x.filename;
            let file = x.file;
            let fieldname = x.fieldname;
            file.on('data', (data) => {
                    //Work with current file
            }

Then on the frontend I sent the request as below:

    let requestBody = new FormData();
    let data = {
        body: postTextBody,
    }
    requestBody.append('data', data);
    if (mediaObjects.length > 0) {
        requestBody.append('files', mediaObjects.map((x) => x.file)); //Attach the multiple files here
    }
    axios.put(url,requestBody)....

I have a feeling this is not the right way to accept multiple files all at once with busboy because it seems not to be working.

What is the right way to accept multiple uploads with busboy?

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!