Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

84
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!