<!-- 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) &gt; [cancel](./storage.uploadtask.cancel.md)

## UploadTask.cancel() method

Cancels a running task. Has no effect on a complete or failed task.

<b>Signature:</b>

```typescript
cancel(): boolean;
```
<b>Returns:</b>

boolean

True if the cancel had an effect.

