GridFS close not working

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Cannot Reproduce
    • Priority: Critical - P2
    • None
    • Affects Version/s: 3.0.0
    • Component/s: None
    • Environment:
      Mac OS X Yosemite version 10.10.4 (14E46)
      mongodb version: 3.0.4
      mongo driver version: 2.0.39
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We are trying to write a buffer object to Mongo DB, and although the “open” and “write” function run correctly the close method never returns on it’s callback. No error reporting, no result. I’m guessing we may be doing something wrong here, but we are following the examples at https://mongodb.github.io/node-mongodb-native/2.0/tutorials/gridfs/ to no avail. Below an example code we are using.

      var gridStore = new GridStore(db, new ObjectID(), 'w',

      { "content_type": "image/png", "chunk_size": 1024*4 }

      );

      gridStore.open(function(err, gridStore) {
      gridStore.write(buffer, function(err, result) {
      gridStore.close(function(err, result)

      { // This callback function never gets called. console.log("File has been written to GridFS"); }

      );
      });
      });

              Assignee:
              Christian Amor Kvalheim
              Reporter:
              Pedro Gomes
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: