DEV Community

Discussion on: Uploading Files to MongoDB with GridFS and Multer Using NodeJS

 
staszeksoup profile image
staszeksoup

Yes I see, so you have to save the file location and file name and add that as a string to the other collection. Thanks for your help

Thread Thread
 
shubhambattoo profile image
Shubham Battoo

File is being saved in its own collection as per gridfs, you can get an objectid for the image uploaded you can reference this objectid