var gfs = Grid(db);
gfs.findOne({ _id: '54dd3fd6f9a55f1c1b25664d' }, function(err, res) {
// res contains file or null if it did not match any file in the current collection
});
Optionally, it's possible to set options.root to specify which collection will the findOne execute on.
This is an implementation of the feature proposed here https://github.com/aheckmann/gridfs-stream/issues/62 and a fix for https://github.com/aheckmann/gridfs-stream/issues/59
Prototype: findOne(options, callback)
findOne can be used like mongodb's findOne:
Optionally, it's possible to set options.root to specify which collection will the findOne execute on.