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

231
Vistas
How can I show download progress in a dialog box for a file download on browser
let bytes = new Uint8Array(data.length);
      for (var i = 0; i <data.length; i++) {
        bytes[i] =data[i];
      }
      let file = new Blob([bytes], { type: "text/xml" });
      let link = document.createElement("a");
      link.href = window.URL.createObjectURL(file);
      let fileName = "file.xml";
      link.download = fileName;
      link.click();
      this.openDialog();

I want to execute openDialog() method once the download is started on the browser. I tried to display the dialog box after the link.click() is executed but if the browsers 'Ask where to save each file before downloading' option is turned on the dialog box is displayed before the user selects the directory and clicks okay.

about 4 years ago · Santiago Trujillo
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