You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 12, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 12, 2025. It is now read-only.
const readStream =this._gridfs.createReadStream(file.filename);
readStream.on('error',(error)=>{
resp.send('No Image from that title!');
resp.end();
})
readStream.pipe(resp);
code like these, when only set up the readStream with filename, it will throw error ,
this._store = new grid.mongo.GridStore(grid.db, this.id || new grid.mongo.ObjectID(), this.name, this.mode, options);
when I debug, I found grid.mongo.ObjectID is undefined
Activity
crossSulation commentedon Dec 18, 2018
By the way, i am using mongoose
crossSulation commentedon Dec 18, 2018
sorry, my fault, actually, when construct the GridFSStream, the second argument should the the instance of mongodb
this._gridfs = GridFSStream(this._conn.connection.db,conn.mongo)
crossSulation commentedon Dec 18, 2018
Made a mistake, actually ,it works, when construct the GRIDFSStream, the second argument should be
the instance of moogodb
this._gridfs = GridFSStream(this._conn.connection.db,conn.mongo)