You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* bugfix(auth): `auth.isLoaded` set to `true` on `AUTH_EMPTY_CHANGE` action dispatch - #290
* feat(storage): customizable file name with `uploadFile` and `uploadFiles` through `name` option (can be String or Function) - #285
* bugfix(query): `remove` dispatches `REMOVE` action type with associated reducer case - #257
* feat(query): `remove` accepts an options object as third argument
* feat(query): `remove` now has `dispatchAction` option for disabling dispatch of new `REMOVE` action type
* feat(query): `dispatchRemoveAction` config option add for global control of dispatching when calling `remove`
`'userSessions'`. If a function is passed, the arguments are: `(currentUser, firebase)`.
89
90
-`enableLogging`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`false` Whether or not firebase
90
91
database logging is enabled.
91
-
-`preserveOnLougout`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)**`null` Data parameters to preserve when
92
+
-`preserveOnLogout`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)**`null` Data parameters to preserve when
92
93
logging out.
93
94
-`updateProfileOnLogin`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to update
94
95
user profile when logging in.
95
96
-`resetBeforeLogin`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to reset auth
96
-
and profile when logging in (see issue #254 for more details).
-`enableRedirectHandling`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to enable
98
101
redirect handling. This must be disabled if environment is not http/https
99
102
such as with react-native.
103
+
-`onAuthStateChanged`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**`null` Function that runs when
104
+
auth state changes.
100
105
-`enableEmptyAuthChanges`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`false` Whether or not to enable
101
106
empty auth changes. When set to true, `onAuthStateChanged` will be fired with,
102
107
empty auth changes such as `undefined` on initialization
the data path. For example role parameter on profile populated from 'roles'
111
116
root. True will call SET_PROFILE as well as a SET action with the role that
112
117
is loaded (places it in data/roles).
113
-
-`dispatchOnUnsetListener`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`false` Whether or not to
118
+
-`dispatchOnUnsetListener`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to
114
119
dispatch UNSET_LISTENER when disabling listeners for a specific path. USE WITH CAUTION
115
120
Setting this to true allows an action to be called that removes data
116
121
from redux (which might not always be expected).
122
+
-`dispatchRemoveAction`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to
123
+
dispatch REMOVE action when calling `remove`.
117
124
-`firebaseStateName`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** 'firebase' Assumed name of Firebase
118
125
state (name given when passing reducer to combineReducers). Used in
-`attachAuthIsReady`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to attach
121
129
firebaseAuthIsReady to store. authIsLoaded can be imported and used
Copy file name to clipboardExpand all lines: docs/api/enhancer.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,8 @@ along side applyMiddleware.
32
32
profile when logging in. (default: `false`)
33
33
-`config.resetBeforeLogin`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not to empty profile
34
34
and auth state on login
35
+
-`config.perserveOnLogout`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Data parameters to perserve when
36
+
logging out. (default: `null`)
35
37
-`config.enableRedirectHandling`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not to enable
-`config.onAuthStateChanged`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Function run when auth state
Copy file name to clipboardExpand all lines: docs/api/firebaseInstance.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,7 @@ Removes data from Firebase at a given path.
165
165
166
166
-`path`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path to location on Firebase which to remove
167
167
-`onComplete`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Function to run on complete (`not required`)
168
+
-`options`
168
169
169
170
**Examples**
170
171
@@ -225,6 +226,8 @@ its metadata in Firebase Database
225
226
-`file`**File** File object to upload (usually first element from
226
227
array output of select-file or a drag/drop `onDrop`)
227
228
-`dbPath`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Database path to place uploaded file metadata
-`options.name`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the file
228
231
229
232
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** Containing the File object
230
233
@@ -239,6 +242,8 @@ to store their metadata in Firebase Database
239
242
-`files`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array of File objects to upload (usually from
240
243
a select-file or a drag/drop `onDrop`)
241
244
-`dbPath`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Database path to place uploaded files metadata.
Copy file name to clipboardExpand all lines: docs/storage.md
+61-46Lines changed: 61 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,67 +8,74 @@ For Examples of how to use these methods, please visit the [recipes section](/do
8
8
9
9
Upload an array of files to a location on Firebase storage. This includes the option to also write meta data for the object to Firebase database.
10
10
11
-
Available on `this.props.firebase`and`getFirebase`.
11
+
Available on `props.firebase`if using `firebaseConnect` HOC or using`getFirebase`.
12
12
13
13
#### Parameters
14
-
-`path`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path within Firebase Storage at which to upload File.
15
-
-`files`**[Blob](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Array of File Blobs to upload to Firebase Storage.
16
-
-`databasePath`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path within Firebase Database at which to write files metadata.
14
+
-`path`[**String**][string-url] - Path within Firebase Storage at which to upload File.
15
+
-`files`[**Array**][array-url] - Array of File Blobs to upload to Firebase Storage.
16
+
-`databasePath`[**String**][string-url] - Path within Firebase Database at which to write files metadata.
17
+
-`options`[**Object**][object-url] - Options for upload
18
+
-`options.name`[**String**][string-url] | [**Function**][function-url] - Name of file or function that returns the name of the file. If a function is passed the argument syntax is `(file, internalFirebase, uploadConfig)` where `file` is the file object (`file.name` is used as default if no name option is passed).
19
+
20
+
##### Returns
21
+
[**Promise**][promise-url] Resolves with an array of [`uploadFile` promises results (described below)](#uploadFile).
17
22
18
23
### uploadFile
19
24
20
25
Upload a single file to a location.
21
26
22
-
Available on `this.props.firebase`and`getFirebase`.
27
+
Available on `props.firebase`if using `firebaseConnect` HOC or using`getFirebase`.
23
28
24
29
#### Parameters
25
-
-`path`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path within Firebase Storage at which to upload File.
26
-
-`file`**[Blob](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** File Blob to upload to Firebase Storage.
27
-
-`databasePath`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path within Firebase Database at which to write file metadata.
30
+
-`path`[**String**][string-url] - Path within Firebase Storage at which to upload File.
31
+
-`file`[**Blob**][blob-url] - File Blob to upload to Firebase Storage.
32
+
-`databasePath`[**String**][string-url] - Path within Firebase Database at which to write file metadata.
33
+
-`options`[**Object**][object-url] - Options for upload
34
+
-`options.name`[**String**][string-url] | [**Function**][function-url] - Name of file or function that returns the name of the file. If a function is passed the argument syntax is `(file, internalFirebase, uploadConfig)` where `file` is the file object (`file.name` is used as default if no name option is passed).
35
+
36
+
##### Returns
37
+
[**Promise**][promise-url] Resolves with an object containing `uploadTaskSnaphot` which is the [**firebase.storage.UploadTaskSnaphot**][upload-task-snapshot-url] returned from the `storageRef.put` call which happens internally. If `databasePath` is provided `snapshot`, `key`, `File`, and `metaDataSnapshot` parameters are also included.
Delete a file from Firebase storage with the option to remove metadata from real time database.
36
46
37
-
Available on `this.props.firebase`and`getFirebase`.
47
+
Available on `props.firebase`if using `firebaseConnect` HOC or using`getFirebase`.
38
48
39
49
#### Parameters
40
-
-`path`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path within Firebase Storage of File to delete.
41
-
-`databasePath`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path within Firebase Database from which to remove File metadata.
50
+
-`path`[**String**][string-url] - Path within Firebase Storage of File to delete.
51
+
-`databasePath`[**String**][string-url] - Path within Firebase Database from which to remove File metadata.
0 commit comments