onProgress() callback for BlockBlobClient.uploadData() in the browser isn't granular #32404
Open
1 of 6 tasks
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Storage
Storage Service (Queues, Blobs, Files)
Describe the bug
The
onProgress()
callback when using BlockBlobClient.uploadData() in the browser is not granular and only updates after each block. This makes it impractical for progress bars and progress reporting without making chunks very small and inefficient.To Reproduce
Steps to reproduce the behavior:
onProgress
callback does not report the progress granularly in a useful way.Expected behavior
Expected that upload progress be recorded more interactively and at a sub-block refresh rate.
Screenshots
N/A
Additional context
From what I've researched, I am aware of a couple of different factors that contribute to this being the case:
@azure/core-rest-pipeline
:onProgress()
could be specified as an option after line 4287. (I don't mean hypothetically, I mean thatstageBlock()
implements it already)azure-sdk-for-js/sdk/storage/storage-blob/src/Clients.ts
Lines 4275 to 4299 in 594557a
BlockBlobClient.stageBlock(...)
the stack grows more complex and abstracted to fit the needs of a variety of environments and runtimes, but it would seem thatonProgress
it pretty respected for the most part underneath (from what I could tell at least).I (naively) think this could be mostly resolved with a few steps:
createXhrHttpClient()
in@azure/core-rest-pipeline
to allow browser consumers to import it again. Maybe there's a history with this being deprecated/removed?BlockBlobClient.uploadSeekableInternal()
and as a result inBlockBlobClient.uploadData()
(see snippets to stub code above)What is the team's stance on this? Thanks.
The text was updated successfully, but these errors were encountered: