From 1f1d5398a6c59609b2374ff0a838ff220c50bf47 Mon Sep 17 00:00:00 2001 From: Krishnaraj Yadav Date: Sun, 4 Oct 2020 22:49:32 +0530 Subject: [PATCH] Small Change in " Create Storage Engine " section In this section , GridFsStorage take up object of url as key . I have improved spelling mistake of mongodb . i.e { url : mongodb } in case you have written { url : mongonURI }. Will you accept the changes ? Thanks for providing this tutorial . It is very helpful to me. --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 398b937..e951aa9 100644 --- a/app.js +++ b/app.js @@ -25,7 +25,7 @@ conn.once('open', () => { // Create storage engine const storage = new GridFsStorage({ - url: monogoURI, + url: mongoURI, file: (req, file) => { return new Promise((resolve, reject) => { crypto.randomBytes(16, (err, buf) => { @@ -105,4 +105,4 @@ app.delete('/files/:id', (req, res) => { }); // Start the Server -app.listen(port, () => console.log(`Server started on port ${port}`)); \ No newline at end of file +app.listen(port, () => console.log(`Server started on port ${port}`));