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

87
Vistas
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 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