Error in mongo driver Streaming

11 views
Skip to first unread message

Alejo Next

unread,
Apr 18, 2015, 1:06:26 PM4/18/15
to node-mong...@googlegroups.com
There is a very grave mistake in the stream, I'll show you how it works

mongo.MongoClient.connect(uri, function (err, db) {
  if(err) return cb(err);
  var store = new GridStore(db, name, 'r', { root: ROOTFILES } );
  store.open(function(err, fs){

    if(err) return cb(err);
    var stream = fs.stream();
    stream
        .pipe([ Changes for my file ]) // This is ok
        .pipe([ Changes for my file ]) // Error because is not a stream
        .pipe([ Dest ]) // Never go to the dest
    });
});

This works to send files from http db customers and modifiar files. Error originates from the 2.x version of mongodb-node
Reply all
Reply to author
Forward
0 new messages