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

212
Vistas
How to create a downloadable file in nodejs and js?

I created a downloadable file in my web page using Javascript and nodejs. The problem is that when the user tries to download it, it takes forever to start the download and when it does it instantly downloads the file. What I want to do, is to show to the user the progress of the download, like in the image below enter image description here

in the server side I just serve the static file using express

const express = require('express')
const app = express()
app.use(express.static('app'));

app.listen(port, () => {
    console.log(`Example app listening at http://${serverIp}:${port}`)
});

in the client side I GET request the file

export const getAppFile = () => {
    return fetch("build/localServer.exe", {
        method: 'GET',
        'content-disposition': 'attachment',
        'content-type': 'application/octet-stream',
      })
      .then((response) => response.blob());
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The download progress is handled by the clients computer. I don't think the computer talks to the browser on the progress. You may want to try something like this: https://stackoverflow.com/a/4168965/15263184

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