Skip to content

Commit

Permalink
prescottprue#487 fix(storage): update fileMetadataFactory syntax for …
Browse files Browse the repository at this point in the history
…downloadURL
  • Loading branch information
jenphillips committed Sep 6, 2018
1 parent 93fc272 commit e10e47b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
6 changes: 3 additions & 3 deletions docs/recipes/upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ When uploading files as in the above example, you can modify how the file's meta

// within your createStore.js or store.js file include the following config
const config = {
fileMetadataFactory: (uploadRes) => {
fileMetadataFactory: (uploadRes, firebase, metadata, downloadURL) => {
// upload response from Firebase's storage upload
const { metadata: { name, fullPath, downloadURLs } } = uploadRes
const { metadata: { name, fullPath } } = uploadRes
// default factory includes name, fullPath, downloadURL
return {
name,
fullPath,
downloadURL: downloadURLs[0]
downloadURL
}
}
}
Expand Down
29 changes: 17 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"redux-react-firebase"
],
"dependencies": {
"@babel/polyfill": "^7.0.0",
"hoist-non-react-statics": "^3.0.1",
"lodash": "^4.17.10",
"prop-types": "^15.6.2"
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@babel/polyfill'
import { createFirebaseInstance } from './createFirebaseInstance'
import firebaseConnect, { createFirebaseConnect } from './firebaseConnect'
import firestoreConnect, { createFirestoreConnect } from './firestoreConnect'
Expand Down

0 comments on commit e10e47b

Please sign in to comment.