-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add upload progress callback #183
Comments
Did you try the |
Sorry, it seems I did not ask the question correctly. I need upload progress, not download progress. And onDownloadProgress doesn't help me. |
I see. We don't have that feature at the moment, but it would be nice to add. I think it could be done similarly to download progress. |
It cannot. Seems like a pretty bizarre thing to leave out of the spec, if you ask me. Until they're added, |
I realize that |
As long as we can determine the total bytes to be uploaded then absolutely :) |
I suppose if the body is just a plain stream, we'd only be able to provide how many bytes have been uploaded but not the total bytes, which may not be super useful. However, if the body is a Blob or a File (or anything that can be normalized to one of those), then we can use |
Really missing this for File uploads. You possible solution sound great @sholladay . |
can this be added yet? axios seems to have this feature. |
@supertiger1234 You are perfectly allowed to submit a PR, yes :) |
🤷 I wouldn't even be using a lib for fetching if I knew how. |
No, I don't think axios supports it for browser. It is only supported in nodejs. Right? |
Please make this :D |
For anyone who wants to try implementing this, take a look at #34 and use that as a reference. Once there's a rough draft, I'd be happy to review and help with the code. |
It seems this should now be possible with Chromium versions > 105. It would be great if it could be incorporated into ky! https://developer.chrome.com/articles/fetch-streaming-requests/#streaming-request-bodies Here's an example implementation: https://stackoverflow.com/a/52860605/19510854 |
I've looked into this a bit more and it wouldn't be as easy to implement in All in all, I don't see an addition like this making sense until |
@Murderlon #632 would you mind giving a review? |
Hello, I would like to add an image loading indicator. Is this possible when using this library?
The text was updated successfully, but these errors were encountered: