You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Mac OS Big Sur
How to reproduce these conditions
Failing test unit, Stackblitz demonstrating the problem
har to show, since it needs access to a writable storage bucket.
But it's a "simple" problem.
Steps to set up and reproduce
upload a file using the AngularFireStorage
whilst uploading subscribe to the percentageChanges() observable
But half way through, unsubscribe from the percentageChanges() the upload will cancel.
Expected behavior
It doesn't feel right that subscribing/unsubscribing to a progress, should impact the upload itself.
listening to stateChanges maybe should cancel the upload if you unsubscribe.
I might be wrong about this.
But I just encountered this problem, and I thought it would be good to inform you of this.
I could not find any documentation regarding canceling of uploads, so it might be a good time to be more upfront about how it works and which use cases we should support.
Actual behavior
unsubscribe from percentageChanges() will cause the upload to cancel.
The text was updated successfully, but these errors were encountered:
…and added replay (#2688)
* unsubscribing from upload progress shouldn't cancel the upload, that was undefined behavior IMO
* `shareReplay` the upload, so one could pick back up (say if they had upload progress `| async` on a view somewhere)
Closes#2685
Version info
Angular:
11.
Firebase:
8.16.1
AngularFire:
6.1.1
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Mac OS Big Sur
How to reproduce these conditions
Failing test unit, Stackblitz demonstrating the problem
har to show, since it needs access to a writable storage bucket.
But it's a "simple" problem.
Steps to set up and reproduce
upload a file using the AngularFireStorage
whilst uploading subscribe to the
percentageChanges()
observableBut half way through, unsubscribe from the
percentageChanges()
the upload will cancel.Expected behavior
It doesn't feel right that subscribing/unsubscribing to a progress, should impact the upload itself.
The problem lies here
https://github.com/angular/angularfire/blob/master/src/storage/observable/fromTask.ts#L16
listening to stateChanges maybe should cancel the upload if you unsubscribe.
I might be wrong about this.
But I just encountered this problem, and I thought it would be good to inform you of this.
I could not find any documentation regarding canceling of uploads, so it might be a good time to be more upfront about how it works and which use cases we should support.
Actual behavior
unsubscribe from
percentageChanges()
will cause the upload to cancel.The text was updated successfully, but these errors were encountered: