Using mongofiles with GridFS in a meteor app -


i starting use gridfs within meteor app. have set file collection "assetfiles" gridfs storage adapter :

assetcollection = new mongo.collection( "assets" );  assetfilestore = new fs.store.gridfs( "assetfiles" ); assetfilescollection = new fs.collection( "assetfiles", {     stores: [assetfilestore] });  assetfilescollection.allow({   insert: function(){     return true;   },   update: function(){     return true;   },   remove: function(){     return true;   },   download: function(){     return true;   } }); 

i have inserted files in , using meteor mongo client checked exist in db.

now extract file db file system using mongofiles utility.

using meteor mongodb database, here list of collections :

meteor:primary> show collections assets cfs._tempstore.chunks cfs.assetfiles.filerecord cfs_gridfs._tempstore.chunks cfs_gridfs._tempstore.files cfs_gridfs.assetfiles.chunks cfs_gridfs.assetfiles.files meteor_accounts_loginserviceconfiguration system.indexes users 

and don't understand how mongofiles utility target assetfiles gridfs file collection particular file or list of files.

here attempt:

./mongofiles -h 127.0.0.1:3001 -d meteor list 2015-05-11t17:34:40.701+0200    connected to: 127.0.0.1:3001 

it returns nothing while connecting db. db on own fs. wanted specify collection name, parameter not exists anymore apparently.

thank help!

you need change prefix attach right collection.

$ mongofiles --help        ....        --prefix=                  gridfs prefix use (default 'fs')` 

eg.

mongofiles --port 3001 -d meteor --prefix 'cfs_gridfs.assetfiles' list 

hope helps! accept please thanks!


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -