From 6905d3d0a87d8c8c339c935433ef519094268ecc Mon Sep 17 00:00:00 2001 From: hippoz Date: Sun, 18 Oct 2020 19:44:11 +0300 Subject: [PATCH] why isn't it working???? help --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8d2b7f2..fc786e2 100644 --- a/index.js +++ b/index.js @@ -139,7 +139,7 @@ app.post('/api/upload', [ cors(corsOptions) ], (req, res) => { } else if(err.code === 'ENOENT') { file.mv(filepath, (err) => { if (err) return res.status(500).render('uploadfailed', { message: 'something went wrong while uploading the file.' }); - res.render('uploaded', { file: { name: chosenFileName }, baseurl: config.url }); + res.render('uploaded', { baseurl: config.url, file: { name: chosenFileName } }); }); } else { return res.status(500).render('uploadfailed', { message: 'something went wrong.' });;