Deletes a file with the given id
Deletes a file with the given id
the id of the file doc
delete(id, callback)
Deletes a file with the given id
Deletes a file with the given id
the id of the file doc
delete(id, callback)
Removes this bucket's files collection, followed by its chunks collection.
Removes this bucket's files collection, followed by its chunks collection.
drop(callback)
Removes this bucket's files collection, followed by its chunks collection.
Removes this bucket's files collection, followed by its chunks collection.
drop(callback)
Convenience wrapper around find on the files collection
Convenience wrapper around find on the files collection
find(filter, options)
Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS.
Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS.
the id of the file document
the download options
openDownloadStream(id, options)
Returns a readable stream (GridFSBucketReadStream) for streaming the file with the given name 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.
the name of the file to download
the download options
bucket.openDownloadStreamByName('meistersinger.mp3')
Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS.
Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS. The stream's 'id' property contains the resulting file's id.
the name of the file to download
the upload options
bucket.openUploadStream('./meistersinger.mp3')
GridFS Bucket