From 6364f3da5220bcc108ccc695aa4c9b4d8208aef8 Mon Sep 17 00:00:00 2001 From: Christopher Rose Date: Sun, 15 Sep 2019 13:18:54 +0530 Subject: [PATCH] Sanity? --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 110f7ab..6a1908f 100644 --- a/index.js +++ b/index.js @@ -14,6 +14,11 @@ app.use(bodyParser.urlencoded({extended:false})) app.use(bodyParser.json()) app.use(busboy()) +///Make the directory if it doesnt exist +if(!fs.existsSync(settings.dirname)){ + fs.mkdirSync(settings.dirname) +} + // Download file //loc app.get('/files/cat',(req,res,next)=>{