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

93
Visualizações
Download percent come only one time when use Azureblob
async function getBackupTemplate(shipKey, historyLogBlobDirectory, reportDataBlobDirectory) {
    const historyLogStreamPath = `${window.remote.app.getPath('userData')}/backupStream1.txt`;
    const reportDataStreamPath = `${window.remote.app.getPath('userData')}/backupStream2.txt`;
    const historyLog = await new Promise((resolve, reject) => {
        const stream = fs.createWriteStream(historyLogStreamPath);
        let historySummary = window.blobService.getBlobToStream(window.containerName, historyLogBlobDirectory, stream, async (err, text) => {
            console.log(historyLogStreamPath)
            console.log('historySummary1', historySummary)

            if (err) {
                if (err.statusCode === 403) {
                    azureCustomService.setRequestDateHeaderFromAzureServerTimeStamp(err.message);

                    await azureCustomService.communicateAzureWithCustomHeader('GET', window.containerName, historyLogBlobDirectory);
                    try {
                        azureCustomService.streamParsingToJSON(historyLogStreamPath, (err, data) => {
                            resolve(JSON.parse(data));
                        });
                    } catch (e) {
                        reject(e);
                    }
                }
            } else {                  
                console.log('comp history', text)
                azureCustomService.streamParsingToJSON(historyLogStreamPath, (err, data) => {
                    resolve(JSON.parse(data));
                });
            }
        });
        console.log('historySummary2', historySummary)

        historySummary.on('progress', function() {
            var percentComplete = historySummary.getCompletePercent(2);
            var totalSize = historySummary.getTotalSize(true);
            console.log('Upload Complete3' + percentComplete);
            console.log('total: ' + totalSize);
        });
    });

----result----

Upload Complete3 (%): 100.00

total: 4.61KB


I want get download progress realtime

but it coming only one time after connection complete.

How can I make ??

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