Skip to content
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

Download and Upload Progress Indicator/Tracking #154

Closed
nickchomey opened this issue Dec 1, 2022 · 3 comments
Closed

Download and Upload Progress Indicator/Tracking #154

nickchomey opened this issue Dec 1, 2022 · 3 comments
Assignees

Comments

@nickchomey
Copy link

nickchomey commented Dec 1, 2022

It would be very neat if wretch could incorporate an easy to use API for tracking download and upload progress, like ky and axios can do.

Upload progress was previously not possible, but it seems this should now be possible with Chromium versions > 105.

https://developer.chrome.com/articles/fetch-streaming-requests/#streaming-request-bodies
fetch() upload streaming - Chrome Platform Status (chromestatus.com)

Here's an example implementation: https://stackoverflow.com/a/52860605/19510854

@elbywan
Copy link
Owner

elbywan commented Dec 1, 2022

Hey @nickchomey,

It would be very neat if wretch could incorporate an easy to use API for tracking download and upload progress, like ky and axios can do.

Indeed, I'll look into it!

I'm not sure it's possible to monitor upload progress though, only download progress (fetch limitation).
Replied too fast sorry.

@elbywan elbywan self-assigned this Dec 1, 2022
elbywan added a commit that referenced this issue Dec 3, 2022
Partially solves #154
@elbywan
Copy link
Owner

elbywan commented Dec 3, 2022

@nickchomey

I just added an addon to monitor the download progress with this commit: 2bae524

Regarding upload progress, it seems to be more complicated unfortunately.
Both Request.body and/or uploading the body as a stream do not seem to be widely supported yet:

So for the moment it does not seem reasonable to implement it.
I will reopen this issue when the time is right 😉.

elbywan added a commit that referenced this issue Dec 3, 2022
Partially solves #154
@elbywan elbywan closed this as completed Dec 3, 2022
@nickchomey
Copy link
Author

Cool stuff, thanks for the update and links! That was an enlightening read, even if I have little technical appreciation for it all. I look forward to it becoming a reality someday, in general and in wretch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants