I can use “-d” option to put files into a database.
mongofiles -d test put file.txt
It worked as expected.I also found out there was collection option. Whats this option for and How to use it? I can’t get more info from man page or its help.
EDIT :
From here http://www.mongodb.org/display/DOCS/GridFS+Specification . I believe there will be two collection will be created named “files” and “chunk” which will contain metadata of file and its actually data. When I simply use -d option alone. I can see these collections under “test” db. So now ,when i use the option -c does that collection will stores what?
According to http://api.mongodb.org/python/current/api/gridfs/index.html#gridfs.GridFS
collectionspecifies the root collection to use.I believe that the expected behaviour is totally internal, i.e. the default collection where the files are stored is
'fs'. You can replace that to have a custom collection name.