<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/storage](./storage.md) &gt; [UploadTask](./storage.uploadtask.md)

## UploadTask interface

Represents the process of uploading an object. Allows you to monitor and manage the upload.

<b>Signature:</b>

```typescript
export interface UploadTask 
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [snapshot](./storage.uploadtask.snapshot.md) | [UploadTaskSnapshot](./storage.uploadtasksnapshot.md) | A snapshot of the current task state. |

## Methods

|  Method | Description |
|  --- | --- |
|  [cancel()](./storage.uploadtask.cancel.md) | Cancels a running task. Has no effect on a complete or failed task. |
|  [catch(onRejected)](./storage.uploadtask.catch.md) | Equivalent to calling <code>then(null, onRejected)</code>. |
|  [on(event, nextOrObserver, error, complete)](./storage.uploadtask.on.md) | Listens for events on this task.<!-- -->Events have three callback functions (referred to as <code>next</code>, <code>error</code>, and <code>complete</code>).<!-- -->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 <em>or</em> as the <code>next</code>, <code>error</code>, and <code>complete</code> 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. |
|  [pause()](./storage.uploadtask.pause.md) | Pauses a currently running task. Has no effect on a paused or failed task. |
|  [resume()](./storage.uploadtask.resume.md) | Resumes a paused task. Has no effect on a currently running or failed task. |
|  [then(onFulfilled, onRejected)](./storage.uploadtask.then.md) | This object behaves like a Promise, and resolves with its snapshot data when the upload completes. |

