Skip to content

Commit 98832e2

Browse files
committed
Merge branch 'master' of github.com:fullstackreact/react-native-firestack
* 'master' of github.com:fullstackreact/react-native-firestack: Correct uploadFile synthax in docs Correct setStorage docs since the method does not return a Promise anymore
2 parents a1d5b8b + 8552fec commit 98832e2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,7 @@ In order to store anything on Firebase, we need to set the storage url provided
485485
The `setStorageUrl()` method accepts a single parameter: your root storage url.
486486

487487
```javascript
488-
firestack.setStorageUrl(`gs://${config.firebase.storageBucket}`)
489-
.then(() => console.log('The storage url has been set'))
490-
.catch(() => console.error('This is weird: something happened...'))
488+
firestack.storage.setStorageUrl(`gs://${config.firebase.storageBucket}`)
491489
```
492490

493491
If the `storageBucket` key is passed as a configuration option, this method is automatically called by default.
@@ -510,7 +508,7 @@ To upload camera photos, we can combine this method with the `react-native-camer
510508
```javascript
511509
this.camera.capture()
512510
.then(({path}) => {
513-
firestack.uploadFile(`photos/${auth.user.uid}/${filename}`, path, {
511+
firestack.storage.uploadFile(`photos/${auth.user.uid}/${filename}`, path, {
514512
contentType: 'image/jpeg',
515513
contentEncoding: 'base64',
516514
})
@@ -547,7 +545,7 @@ takePicture() {
547545
this.camera.capture()
548546
.then(({path}) => {
549547
const filename = 'photo.jpg'
550-
firestack.uploadFile(`photos/${filename}`, path, {
548+
firestack.storage.uploadFile(`photos/${filename}`, path, {
551549
contentType: 'image/jpeg',
552550
contentEncoding: 'base64',
553551
}, (evt) => {

0 commit comments

Comments
 (0)