mongoose-gridfs-extra

Home > mongoose-gridfs-extra > getGridFSBucketDb

getGridFSBucketDb() function

getGridFSBucketDb returns mongodb Db instance which is used to create this bucket.

this not a wrapper of mongodb public native api, so use this method carefully

Signature:

declare function getGridFSBucketDb(bucket: mongo.GridFSBucket): mongo.Db;

Parameters

Parameter Type Description
bucket mongo.GridFSBucket a mongodb gridFS bucket

Returns:

mongo.Db

mongodb Db instance