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

278
Vistas
how to download a file with express and handle with errors

i have a post method "/exports" that gets information out of a database and creates a xml file. at the end of the funktion, i want the user to download this xml file. therefore I used this:

 res.download('./downloads/'+ name+".xml", (err)=>{
      if(err) console.log(err)
 })
 res.redirect('/');

But I only got this error then:

Error: Request aborted
    at onaborted (/home/ec2-user/environment/node_modules/express/lib/response.js:1030:15)
    at Immediate._onImmediate (/home/ec2-user/environment/node_modules/express/lib/response.js:1072:9)
    at processImmediate (node:internal/timers:466:21) {
  code: 'ECONNABORTED'
}

The name of the file and the direction is correct, so I don't know what this error means.

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