Skip to content

Commit 211a463

Browse files
authored
v2.2.0-alpha.2
* fix(storage): uploadFile gets downloadURL before writing metadata - prescottprue#487, prescottprue#488 * fix(storage): add unit tests for `fileMetadataFactory` (config level) and `metadataFactory` (option for uploadFile) to confirm downloadURL is available before writing metadata - prescottprue#487, prescottprue#488 * fix(storage): fix downloadURL error in file upload metadata - @jpierce42 * fix(auth): `LOGOUT` action dispatch only include preserve parameter if provided in settings (not when undefined)
2 parents 6f0d646 + 9068da8 commit 211a463

File tree

12 files changed

+680
-161
lines changed

12 files changed

+680
-161
lines changed

.eslintrc

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ plugins: [babel, react, prettier]
88
env:
99
browser: true
1010
es6: true
11-
jasmine: true
12-
node: true
1311

1412
rules:
1513
semi: [2, 'never']

docs/getting_started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const firebaseConfig = {
4040
databaseURL: '<your-database-url>',
4141
storageBucket: '<your-storage-bucket>'
4242
}
43-
firebase.initializeApp(config)
43+
firebase.initializeApp(firebaseConfig)
4444

4545
// react-redux-firebase options
4646
const config = {

docs/recipes/upload.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ When uploading files as in the above example, you can modify how the file's meta
8484

8585
// within your createStore.js or store.js file include the following config
8686
const config = {
87-
fileMetadataFactory: (uploadRes) => {
87+
fileMetadataFactory: (uploadRes, firebase, metadata, downloadURL) => {
8888
// upload response from Firebase's storage upload
89-
const { metadata: { name, fullPath, downloadURLs } } = uploadRes
89+
const { metadata: { name, fullPath } } = uploadRes
9090
// default factory includes name, fullPath, downloadURL
9191
return {
9292
name,
9393
fullPath,
94-
downloadURL: downloadURLs[0]
94+
downloadURL
9595
}
9696
}
9797
}

0 commit comments

Comments
 (0)