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

[Question] Upload progress #155

Open
shawnmclean opened this issue Nov 6, 2017 · 1 comment
Open

[Question] Upload progress #155

shawnmclean opened this issue Nov 6, 2017 · 1 comment
Labels

Comments

@shawnmclean
Copy link

Is there anyway to get the progress in percent or otherwise when using this library as a means of file upload? Can I push the progress into redux? I've seen #131 but not sure if its referring to the same thing where there is no way of doing this.

@nason nason added the question label Nov 20, 2017
@chapa
Copy link

chapa commented Feb 2, 2019

Hey!

I managed to solve this problem with a middleware : https://gist.github.com/chapa/ba215d65fa0f0b47f582119574623c1c#file-progressmiddleware-js

Thanks to this middleware, I just have to add a 4th type in my RSAA actions and it will be dispatched every times the upload progress updates
It takes place before redux-api-middleware and overrides (only when there is a 4th type) the fetch option to use XMLHttpRequest instead

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

No branches or pull requests

3 participants