Hey all,
I’m trying to build a relatively basic imageboard. I’m using GridFS to upload an image, but I’m trying to create a comments section for each image. What I’m trying to do is create a new entry in a mongoDB store (ie. CommentDB), and I want to tie that document to the _id of the image that was uploaded, so I figure do something like:
myId = this._id;
CommentDB.insert({photoID: myId});
then I would update that document with comments every time a user comments on it.
So how do I do this? I figured that after the image is uploaded, somehow get the _id returned, but I can’t find any documentation that explains how to get it returned.
Any help would be great