UploadFS GridFS Store
A Mongo GridFS store for UploadFS.
Installation
To install the package, execute this command in the root of your project :
meteor add jalik:ufs-gridfs
If later you want to remove the package :
meteor remove jalik:ufs-gridfs
Creating a Store
The code below is available on the client and the server.
GridFS store files in a Mongo database by cutting them in chunks.
1import {Mongo} from 'meteor/mongo'; 2import {UploadFS} from 'meteor/jalik:ufs'; 3import {GridFSStore} from 'meteor/jalik:ufs-gridfs'; 4 5// Declare store collection 6const Photos = new Mongo.Collection('photos'); 7 8// Declare store 9const PhotoStore = new GridFSStore({ 10 collection: Photos, 11 name: 'photos', 12 chunkSize: 1024 * 255 13});
License
This package is released under the MIT License.