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

File upload progress blocked by Angular Service-Worker #8836

Open
bOo-sRi opened this issue Aug 21, 2023 · 2 comments
Open

File upload progress blocked by Angular Service-Worker #8836

bOo-sRi opened this issue Aug 21, 2023 · 2 comments

Comments

@bOo-sRi
Copy link

bOo-sRi commented Aug 21, 2023

Type of issue: (check with "[x]")

  • New feature request
  • Bug
  • Support request
  • Documentation

Current behaviour:
The upload progress counter (file size counter) is missing in File Upload Dialog Component when Service Worker is used.

Expected behavior:
The file size counter should display the progress.
To achieve that the upload request must include the ngsw-bypass header.
https://angular.io/guide/service-worker-devops#bypassing-the-service-worker

Steps to reproduce the issue:

  1. Serve Alfresco Angular App with Service-Worker
  2. Upload a file
  3. See the progress counter not counting upwards. Progress displaying 0/0 until upload is finished.

Component name and version:
adf-file-uploading-dialog

Browser and version:
all

@DenysVuika
Copy link
Contributor

This is an external issue, and you can track it here w3c/ServiceWorker#1141 or use some workarounds suggested here angular/angular#21191 (comment)

@bOo-sRi
Copy link
Author

bOo-sRi commented Sep 19, 2023

Angular already provides a workaround for bypassing the Service worker https://angular.io/guide/service-worker-devops#bypassing-the-service-worker. For upload requests you have to set the ngsw-bypass header or query parameter. However we're unable to set custom header or query parameter for upload requests which would be the easiest way to achieve that.

Modifying the Service Worker could be a solution although it is hard to maintain.

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

No branches or pull requests

2 participants