voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
29 lines (17 loc) • 968 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/storage](./storage.md) > [uploadBytes](./storage.uploadbytes.md)
## uploadBytes() function
Uploads data to this object's location. The upload is not resumable.
<b>Signature:</b>
```typescript
export declare function uploadBytes(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): Promise<UploadResult>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| ref | [StorageReference](./storage.storagereference.md) | StorageReference where data should be uploaded. |
| data | Blob \| Uint8Array \| ArrayBuffer | The data to upload. |
| metadata | [UploadMetadata](./storage.uploadmetadata.md) | Metadata for the data to upload. |
<b>Returns:</b>
Promise<[UploadResult](./storage.uploadresult.md)<!-- -->>
A Promise containing an UploadResult