DEV Community

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

Collapse
 
abskmj profile image
abskmj

Amazing post! I referred to this to implement one of my projects.

Eventually, I put together a reusable Mongoose Schema which further simplifies Mongoose and MongoDB GridFS setup. It is available as an NPM module called GridFile. It also supports the Mongoose schema association and query population.

Here is an example of how to use GridFile to upload/download files to/from MongoDB GirdFS.