Hello gridfs lib + fsHooks for mongodb bucket storage

This commit is contained in:
David Arnold 2020-09-13 16:36:34 -05:00
parent ee2ffc616a
commit f650a17cd8
No known key found for this signature in database
GPG key ID: 6D6A936E69C59D08
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,
);
};