How to use GridFS to store images using Node.js and Mongoose
I was not satisfied with the highest rated answer here and so I’m providing a new one: I ended up using the node module ‘gridfs-stream’ (great documentation there!) which can be installed via npm. With it, and in combination with mongoose, it could look like this: var fs = require(‘fs’); var mongoose = require(“mongoose”); var … Read more