Open jisamathew opened 5 years ago
Hey, have you got any solution. Please let me know asap. Email : singhanuj620@gmail.com
Refer to #131, you may go back and try to configure the connection of GridFs.
Instead of using the connection
object, you may use connection.db
const Grid = require("gridfs-stream")
let gfs
// ...connect the database
const {connection,mongo} = mongoose
gfs = Grid(connection.db, mongo)
gfs.collection('bucketName')
I have used below code for retreiving image from gridfs but getting error "Cannot read property 'readPreference' of null at new GridStore"