progress callback is never called when service worker is activated #990
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It seems XMLHttpRequest isn't supported when service worker is activated : https://www.fxsitecompat.com/en-CA/docs/2015/xmlhttprequest-is-no-longer-available-in-service-workers/
It probably cause the no trigger progress callback.
The fetch API can be the solution to fix this issue.
ng2-file-upload can't be used in a pwa if xhr is not changed to fetch then?
Did anyone ever figure out a workaround for this issue ?
@omardoma
in case you haven't figured out the workaround, in your service worker file which is ngsw-worker.js (if it is from Angular cli), in the onFetch function, you should modify the function so that it stops executing when detecting your upload endpoint.
You can check out this article for more information