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
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
- Compatibility with MongoDb versions 2 and 3.
10
10
- Really simple api.
11
-
- Compatible with any Node.js version equal or greater than 10.
11
+
- Compatible with any current Node.js version.
12
12
- Caching of url based connections.
13
13
- Compatible with Mongoose connection objects.
14
14
- Promise support.
@@ -182,7 +182,7 @@ const db = client.then(cl => cl.db('database'));
182
182
conststorage=newGridFsStorage({ db, client});
183
183
```
184
184
185
-
Using this feature is highly recommended to keep the storage in sync with the underlying connection status and to make your code more resilient to future changes in the mongodb library.
185
+
Using this feature is highly recommended in order to keep the storage in sync with the underlying connection status and to make your code more resilient to future changes in the mongodb library.
186
186
187
187
#### file
188
188
@@ -194,7 +194,7 @@ A function to control the file storage in the database. Is invoked **per file**
194
194
195
195
This module uses [`GridFSBucket`](http://mongodb.github.io/node-mongodb-native/3.1/api/GridFSBucket.html) to store files in the database falling back to [`GridStore`](http://mongodb.github.io/node-mongodb-native/3.1/api/GridStore.html) in case the previous class is not found like, for example, in earlier versions of MongoDb.
196
196
197
-
By default, naming behaves exactly like the default Multer disk storage. A 16 bytes long name in a hexadecimal format with no extension is generated for each file to guarantee that there are very low probabilities of collisions. You can override this by passing your own function.
197
+
By default, naming behaves exactly like the default Multer disk storage, a 16 bytes long name in a hexadecimal format with no extension is generated for each file to guarantee that there are very low probabilities of collisions. You can override this by passing your own function.
198
198
199
199
The return value of this function is an object, or a promise that resolves to an object (this also applies to generators) with the following properties.
200
200
@@ -464,7 +464,7 @@ try {
464
464
465
465
Remember that you don't need to wait for the connection to be ready to start uploading files. The module buffers every incoming file until the connection is ready and saves all of them as soon as possible.
466
466
467
-
The `ready` method is just a convenience function over code written using the `connection` events also with a couple of advantages. If you setup a listener after the `connection` or `connectionFailed` events are dispatched your code will not execute while using the `ready` method it will. The module keeps track of this events and resolves or rejects the promises accordingly. Promises in this case are more readable than events and more reliable.
467
+
The `ready` method is just a convenience function over code written using the `connection` events also with a couple of advantages. If you set up a listener after the `connection` or `connectionFailed` events are dispatched your code will not execute while using the `ready` method it will. The module keeps track of these events and resolves or rejects the promises accordingly. Promises in this case are more readable than events and more reliable.
0 commit comments