-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Showing upload progress #378
Comments
aws suggest using xhr to show upload progress in browsers – https://github.com/aws/aws-sdk-js-v3/blob/main/packages/xhr-http-handler/README.md fetch with a ReadableStream body requires |
2 tasks
This will be put on hold. Interim solution can be found in this ticket: storacha/w3up#655 |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We want to show a progress bar to inform the user of what is happening during an upload. At a minimum we want to show how much of the data has been send to w3, e.g.
But there are some hurdles!
upload-client
library doesn't expose an upload progress callbackfetch
which doesn't provide a mechanism to report upload progress.Some options
upload-client
to useXMLHttpRequest
where available, which provides aprogress
eventupload-client
to use fetch with aReadableStream
as the Request body. We wrap the body in a custom stream that just tracks number of bytes that pass through it, and use this as a proxy for bytes actually sent. This is supported in by about 60% of current browsers, notably Chrome & Edge, but not Firefox or Safari. There are caveats too, e.g. http2 connection required, outlined herePart of #134
The text was updated successfully, but these errors were encountered: