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.' });;