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

216
Vistas
onProgress with uploadData() method is giving progress update only once i.e. the final response

I'm using uploadData() method for uploading local file to azure file share.I'm facing issue with onProgress as I'm getting a single progress update i.e. the final update when file finally gets uploaded. Can some guide where I'm going wrong?

await fileClient.uploadData(selectedFile, { rangeSize: 4 * 1024 * 1024, // 4MB range size parallelism: 20, // 20 concurrency onProgress: ev => console.log(ev) });

https://github.com/Azure/azure-sdk-for-js/blob/%40azure/storage-file-share_12.8.0/sdk/storage/storage-file-share/samples/javascript/advanced.js

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Azure Files offers fully managed file shares in the cloud that are accessible via the industry standard Server Message Block (SMB) protocol.

I checked some documents and blogs and found that the method is a parallel uploading method and it just sends a single request to Azure Storage server. So if you want to get onProgress executed many times, I suggest you use the method uploadStream. For more information check this parallel uploading methods.

We can achieve Parallel uploading a Readable stream with ShareFileClient.uploadStream() in Node.js runtime as shown below.

await fileClient.uploadStream(fs.createReadStream(localFilePath), fileSize, 4 * 1024 * 1024, 20, {
abortSignal: AbortController.timeout(30 * 60 * 1000), // Abort uploading with timeout in 30mins
onProgress: (ev) => console.log(ev)
});
console.log("uploadStream success");

Also read this FileUploadStreamOptions interface document for more information.

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