Hello gridfs lib + fsHooks for mongodb bucket storage

This commit is contained in:
David Arnold 2020-09-13 16:36:34 -05:00 committed by Denis Perov
parent d75fd69406
commit 18bd797ab9
5 changed files with 128 additions and 0 deletions

View file

@ -0,0 +1,9 @@
import { MongoInternals } from 'meteor/mongo';
export const createBucket = bucketName => {
const options = bucketName ? { bucketName } : void 0;
return new MongoInternals.NpmModule.GridFSBucket(
MongoInternals.defaultRemoteCollectionDriver().mongo.db,
options,
);
};