Closed mkilp closed 6 years ago
Hey there!
I'm using gridfs with mongoose and running into this error:
"name":"MongoError","message":"file with id 5adfc7a99b0e190f7aa9cd0a not opened for writing","driver":true
with this code:
db.User.findById(obj.api_token, function (err, user) { db.Attachment.readById(user.picture.id, function (error, buffer) { if(buffer) { callback(null, buffer); } else { callback(error, null); } }) });
I made sure the file itself exists in the database and is available. Any idea how this happened?
Kind regards Nop0x
@Nop0x Not sure. May you please add your scenario on the specs.
Hey there!
I'm using gridfs with mongoose and running into this error:
"name":"MongoError","message":"file with id 5adfc7a99b0e190f7aa9cd0a not opened for writing","driver":true
with this code:
I made sure the file itself exists in the database and is available. Any idea how this happened?
Kind regards Nop0x