diff --git a/index.js b/index.js index e1e35c1..8d2b7f2 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 }, config: { url: config.url } }); + res.render('uploaded', { file: { name: chosenFileName }, baseurl: config.url }); }); } else { return res.status(500).render('uploadfailed', { message: 'something went wrong.' });; diff --git a/views/uploaded.ejs b/views/uploaded.ejs index 25d04a0..e8ab3ae 100644 --- a/views/uploaded.ejs +++ b/views/uploaded.ejs @@ -9,6 +9,6 @@

the file was uploaded

i think


- go to file + go to file \ No newline at end of file