aheckmann / gridfs-stream

Easily stream files to and from MongoDB
MIT License
615 stars 120 forks source link

exist(...) never returning #123

Open NineToeNerd opened 6 years ago

NineToeNerd commented 6 years ago
console.log('Checking');
gfs.exist({ _id: fileId }, function (err, found) {
  console.log('Done checking');
});

The callback above is never reached (the line console.log('Done checking');). I tried fileId as a string and ObjectID.

The file is found successfully when I use: gfs.findOne({ _id: fileId }, function (err, file) { ... }); so I'm using that for now, but I thought you might want to look into this.

NodeJS version: 9.1.0 NPM version: 5.5.0 gridfs-stream version: 1.1.1