-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: http upload/download progress handlers #54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way this can work in node too? Shim in xmlhttprequest (disclaimer - I've never used that module, just Googled it) or fall back to http
from node core?
@achingbrain can we do this as a followup, so we could unblock webui ipfs/ipfs-webui#1534 ? |
I also looked at the linked library along with numerous others in on npm and it seems that none support upload / download progress events and in fact non that I have looked support node streams. node-fetch is particular in that regard that it switches We could fall back to plain |
@achingbrain I have added progress events for node as well, by wrapping around request body if |
Published in |
Fixes a regression introduced by #54 - in the browser by default the response body is interpreted as a string which can become corrupted when non-printable characters are encountered.
I think we might have to revert this - the upload/download progress handlers are useful but XHR has no way of doing streaming downloads so it's broken pubsub in the browser as it works via long-lived requests and the call to make the request doesn't return until the You can access partially loaded content via the @Gozala any ideas on this? |
This reverts commit d30be96.
As per #52 this adds
onUploadProgress
/onDownloadProgress
optional handlers. Intention is to allow ipfs-webui to render file upload progress when new content is added.Fixes #52