The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

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>