Index
Properties
snapshot
Methods
cancel
Returns boolean
True if the cancel had an effect.
catch
Parameters
onRejected: (error: FirebaseStorageError) => any
Parameters
error: FirebaseStorageError
Returns any
Returns Promise<any>
on
Events have three callback functions (referred to as
next
,error
, andcomplete
).If only the event is passed, a function that can be used to register the callbacks is returned. Otherwise, the callbacks are passed after the event.
Callbacks can be passed either as three separate arguments or as the
next
,error
, andcomplete
properties of an object. Any of the three callbacks is optional, as long as at least one is specified. In addition, when you add your callbacks, you get a function back. You can call this function to unregister the associated callbacks.Parameters
event: TaskEvent
The event to listen for.
Optional nextOrObserver: StorageObserver<UploadTaskSnapshot> | null | ((snapshot: UploadTaskSnapshot) => any)
The `next` function, which gets called for each item in the event stream, or an observer object with some or all of these three properties (`next`, `error`, `complete`).
Optional error: ((error: FirebaseStorageError) => any) | null
A function that gets called with a
FirebaseStorageError
if the event stream ends due to an error.Optional complete: firebase.Unsubscribe | null
A function that gets called if the event stream ends normally.
Returns Function
If only the event argument is passed, returns a function you can use to add callbacks (see the examples above). If more than just the event argument is passed, returns a function you can call to unregister the callbacks.
pause
Returns boolean
True if the pause had an effect.
resume
Returns boolean
True if the resume had an effect.
then
Parameters
Optional onFulfilled: ((snapshot: UploadTaskSnapshot) => any) | null
The fulfillment callback. Promise chaining works as normal.
Optional onRejected: ((error: FirebaseStorageError) => any) | null
The rejection callback.
Returns Promise<any>