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
{{ message }}
Repository navigation
don't cancel the upload if you unsubscribe from AngularFireUploadTask.percentageChanges() #2685
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.
Activity
jamesdaniels commentedon Nov 24, 2020
Thanks for the report, yeah that is surprising behavior IMO. I'm going to fix in the next patch.
jamesdaniels commentedon Nov 24, 2020
Will cut with
6.1.2this afternoon.fix(storage): unsubscribing from the upload progress will not cancel …