Skip to content

Commit 175c55a

Browse files
committed
docs: polish storage page
1 parent 1786afa commit 175c55a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/guide/storage.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Firebase Storage
22

3-
[Firebase Storage](https://firebase.google.com/docs/storage/web/start) is a cloud storage service for Firebase. It allows you to store and serve user-generated content like images, audio, video, and other files. While most of the APIs can be used as you would normally do with Firebase, VueFire exposes a few composables to integrate better with Vue that not only give you access to reactive variables but also to some actions like `upload()` to update a file while keeping the reactive variable up to date at the same time.
3+
[Firebase Storage](https://firebase.google.com/docs/storage/web/start) is a cloud storage service for Firebase. It allows you to store and serve user-generated content like images, audio, video, and other files. While most of the APIs can be used as you would normally do with Firebase, VueFire exposes a few composables to integrate better with Vue. These not only give you access to reactive variables, but also to some actions like `upload()` which updates a file while also keeping the reactive variable up to date.
44

55
## Installation
66

@@ -10,9 +10,9 @@ You can access the Firebase Storage from within any component with the composabl
1010

1111
## Uploading Files
1212

13-
You can upload and monitor the progress of a file upload with the `useStorageFile()` composable. This also exposes the URL of the file once it's uploaded and its metadata, let's start with a full example of a form upload:
13+
To upload and monitor the upload progress of a file, use the `useStorageFile()` composable. This will expose the URL and metadata of the file once it's uploaded. Here's a full example of a form upload:
1414

15-
```vue{4,?}
15+
```vue{5,18}
1616
<script setup lang="ts">
1717
// See https://vueuse.org/core/useFileDialog
1818
import { useFileDialog } from '@vueuse/core'
@@ -73,9 +73,9 @@ Once the picture is uploaded, you can use the `url` reactive variable. For examp
7373

7474
## Downloading Files
7575

76-
VueFire also exposes a smaller composable that only retrieves the url of a file. This is useful if you don't need to upload a file but only display it:
76+
To get the download URL for a file, use the `useStorageFileUrl()` composable. This is useful if you only need to display a file:
7777

78-
```vue{4,?}
78+
```vue{3,11}
7979
<script setup lang="ts">
8080
import { ref as storageRef } from 'firebase/storage'
8181
import { useFirebaseStorage, useStorageFileUrl } from 'vuefire'
@@ -92,12 +92,12 @@ const {
9292

9393
## File metadata
9494

95-
The same way you can access the file URL you can also access the file metadata. You can also use the `update()` function to update the metadata and keep the reactive variable up to date:
95+
To access the file metadata, use the `useStorageFileMetadata()` composable. You can use the `update()` function to keep the metadata and reactive variable up to date:
9696

97-
```vue{4,?}
97+
```vue{3,13}
9898
<script setup lang="ts">
9999
import { ref as storageRef } from 'firebase/storage'
100-
import { useFirebaseStorage, useStorageFile } from 'vuefire'
100+
import { useFirebaseStorage, useStorageFileMetadata } from 'vuefire'
101101
102102
const storage = useFirebaseStorage()
103103
const mountainFileRef = storageRef(storage, 'images/mountains.jpg')

0 commit comments

Comments
 (0)