How can I delete a file with multer gridfs storage?
问题 The following code works as expected to upload and retrieve files: // Mongo URI const mongoURI = 'mongodbconnstring'; // // Create mongo connection const conn = mongoose.createConnection(mongoURI); // // Init gfs let gfs; conn.once('open', () => { gfs = new mongoose.mongo.GridFSBucket(conn.db, { bucketName: 'Uploads' }); }); // Create storage engine const storage = new GridFsStorage({ url: mongoURI, file: (req, file) => { return new Promise((resolve, reject) => { const filename = file