When the first call to openUploadStream is made, the upload stream will check to see if it needs to create the proper indexes on the chunks and files collections. This event is fired either when 1) it determines that no index creation is necessary, 2) when it successfully creates the necessary indexes.
Sets or gets the default captureRejection value for all emitters.
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Removes this bucket's files collection, followed by its chunks collection.
Convenience wrapper around find on the files collection
Get the Db scoped logger.
Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS.
Returns a readable stream (GridFSBucketReadStream) for streaming the
file with the given name from GridFS. If there are multiple files with
the same name, this will stream the most recent file with the given name
(as determined by the uploadDate
field). You can set the revision
option to change this behavior.
Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS. The stream's 'id' property contains the resulting file's id.
The value of the 'filename' key in the files doc
Optional settings.
Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS for a custom file id. The stream's 'id' property contains the resulting file's id.
Returns a list listener for a specific emitter event name.
Generated using TypeDoc
Constructor for a streaming GridFS interface