You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if I remove the "connection: mongoose.connection" , so it looks more like your test code, it still creates the file in the mongo database, but still doesn't trigger the callback or. close the connection.
Open up the schema.js file in the source code and try changing line 94
from: this.constructor.findById(created._id, done);
to: bucket.findById(created._id, done);
@vrmerlin I think you have used await in a wrong way here as when the write process is called it will call callback method and not a promise getting resolved.
You can wrap this login inside a promise to make this work.
I seem to be able to successfully write a file, but have no callback triggered to prove I did it. My code looks roughly like this:
Am I not passing in the connection correctly, to the createModel()?
Thanks,
John
The text was updated successfully, but these errors were encountered: