Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

238
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda