Home > @firebase/storage > UploadTask > then
UploadTask.then() method
This object behaves like a Promise, and resolves with its snapshot data when the upload completes.
Signature:
then(onFulfilled?: ((snapshot: UploadTaskSnapshot) => unknown) | null, onRejected?: ((error: FirebaseStorageError) => unknown) | null): Promise<unknown>;
Parameters
Parameter | Type | Description |
---|---|---|
onFulfilled | ((snapshot: UploadTaskSnapshot) => unknown) | null | The fulfillment callback. Promise chaining works as normal. |
onRejected | ((error: FirebaseStorageError) => unknown) | null | The rejection callback. |
Returns:
Promise<unknown>