<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/storage](./storage.md) &gt; [ref](./storage.ref_1.md)

## ref() function

Returns a StorageReference for the given path in the default bucket.

<b>Signature:</b>

```typescript
export declare function ref(storageOrRef: StorageService | StorageReference, path?: string): StorageReference;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  storageOrRef | [StorageService](./storage.storageservice.md) \| [StorageReference](./storage.storagereference.md) | <code>StorageService</code> or <code>StorageReference</code>. |
|  path | string |  |

<b>Returns:</b>

[StorageReference](./storage.storagereference.md)

