Skip to content

Tracking upload progress with RTK Query #2603

Answered by phryneas
zcuric asked this question in Q&A
Discussion options

You must be logged in to vote

Writing such a baseQuery wouldn't really help you, as RTK Query itself only tracks start and end, no progress.

My recommendation would be to handle such an upload independently from RTK Query - or maybe in a queryFn. There you won't be able to use fetch, as fetch unfortunately does not track progress - you'd have to use axios or one manual XHRRequest.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@zcuric
Comment options

Answer selected by zcuric
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants