Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

140
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda