-
Notifications
You must be signed in to change notification settings - Fork 160
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
Service worker prevents Axios file upload progress #774
Comments
Hi @mrcarl79, Thank you for the issue. Do you have more information about what is not working? The error message, etc. |
It is this FileReader event: We have an API that accepts file uploads, we use Axios in our React project to post to our API and axios passes back this progress event which allows up to show a progress bar as large files upload. There is no error message just this event gets ignored. Yes it works without service worker. The request content type is multipart/form-data. Thanks, Carl |
Thank you for the information. I think i can investigate with that :) |
Encountered the same issue while fetching a file. Had to disable the web worker as a workaround. Silent issue. wouldn't have found it without this post. |
@guillaume-chervet Do you know if this is something that is an issue in the service worker? it's still a known issue on our project and I'd like to find a way to get our upload progress back |
Hi @tellaconz , yes this is still an issue. I do not have any project for the moment with file progress. I can set it up on an old one but it will require me some times. |
Thank you all for the issue. It will help to make the library better. |
It seems it is not so easy to resolve w3c/ServiceWorker#1141 |
@guillaume-chervet , we are facing similar issue that the axios callback (on-progress) during multi-part upload is not being called, when the service worker is in use. Is there any fix available for this. If not, is there any workaround or quick-fix? Any help would be appreciated. Thanks. |
Hi @srinhari unfortunately it is a chrome bug. In my application I have set a generic loader without progress bar for file upload. |
Thank you @guillaume-chervet for your response. Actually, we have tested with Firefox as well. The callback is not invoked on firefox as well. Does not seem to be a browser specific issue. |
It does not look like chrome specific bug, rather limitation of service workers in general.
No matter which solution we choose I can quickly code it and submit PR. My personal preference will be option 2 as it is very clear what is happening and also it eliminates dependency on string matching\function in SW. You control all from the code when making request. |
@guillaume-chervet Any ideas or feedback on this? Right now we ended up using forked version of the library with option 3 from above implemented to support our workflow. Bu this is not ideal and I hope we can embed some of workarounds above into main stream so we can get regular updates from other contibuters |
Hi @VladimirPlatonenko , yes it seem to be a nice enhancement to complete regex and string match selector by a custom function selector. Do you have time to send a pullrequest ? I am 2 weeks of and back in May Thank you very much for all your feedbacks @VladimirPlatonenko and ideas. i'am pretty sure it will help for who will encounter the same problem. |
Hi @VladimirPlatonenko , May we close this issue? |
Hi,
I have your react-oidc package working for our auth, but I've just noticed that file upload progress for our uploader has stopped working and I believe this is due to the service worker relaying the request.
I use Axios in this kind of way:
https://github.com/axios/axios/blob/master/examples/upload/index.html
It has a call back function that gives us the progress status, but this is now not being run.
I don't have a huge amount of experience with service workers or oidc security, but looking for a way to solve this.
Is this a feature that can be built into the service worker? or would another solution need to be found?
Thanks, Carl
The text was updated successfully, but these errors were encountered: