ngx-uploader icon indicating copy to clipboard operation
ngx-uploader copied to clipboard

Progress bar doesn't work when using service workers

Open doronsever opened this issue 7 years ago • 4 comments

I have a NG4 project and we are using this module for our file uploads.

Since we turned the service-worker option in the cli, the progress bar stopped working.

If I disable the service worker or do a hard refresh, all works fine. It seems that the event itself doesn't fire.

Does anyone come across that?

doronsever avatar Oct 19 '17 11:10 doronsever

hi @doronsever, in case you find a solution please write here or feel free to open a pr. thank you.

jkuri avatar Oct 19 '17 11:10 jkuri

Same here, if service workers are active, not only do the uploading events never fire, but if the file is too big, it timeouts after 2 mins.

etiennetalbot avatar Aug 10 '18 13:08 etiennetalbot

Hello @doronsever, For the above problem you can pass the ngsw-bypass into header or the query parameters as follow headers: { 'ngsw-bypass': 'ignored/empty/omitted' } with the help of this error it will allowed to bypass the service worker entirely and let the browser handle the request instead.

ravishah247 avatar Dec 23 '19 09:12 ravishah247

I rather have it control by inline params so in the ngsw config I could set it up

doronsever avatar Dec 23 '19 12:12 doronsever