Closed DominicBoettger closed 10 years ago
Can you explain a little more? Is it broken now? I'd feel more comfortable accepting this pull request if you add a test.
It was not possible to create a Readstream with your settings cause "MYNAME.files" is not the valid collection.
Grid.prototype.collection = function (name) { name || (name = this.mongo.GridStore.DEFAULT_ROOT_COLLECTION); return this._col = this.db.collection(name); }
this.mongo.GridStore.DEFAULT_ROOT_COLLECTION returns "fs" and not fs.files
So if you set the collection you must not append + ".files".
I thought there was already a test for collection, did not check that..... If there is already a test it should always fail on creating a readstream with a collection which is not the defaultcollection.
no test after 10 months. closing.
Signed-off-by: DominicBoettger Dominic.Boettger@inspirationlabs.com
When creating a readstream with a different collection name it's needed to add the root. "files" and "chunks" then gets automatically added.
Tested for Readstream!