Category "gridfs"

Unable to render PDF to browser when retrieved from gridfs-stream

My Controller : - view: async (req, res) => { var id = req.params.pid id = mongoose.Types.ObjectId(id) const project = await P

how to download a file saved in gridFS using nodeJS

I need to download a resume from GridFS, below is the code ive written to do it, but this seems to not give me a physical file for download, this is used to rea

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'unlink' of undefined at Grid.remove

I'm trying to delete a file by its id using gridfs but I get this error when calling the delete API. Controller : let gfs; connect.once("open", () => { gf