diff --git a/index.js b/index.js index 516afdd..283e34b 100644 --- a/index.js +++ b/index.js @@ -74,7 +74,7 @@ app.post('/upload/task', upload.single('file'), (req, res) => { } const oldPath = req.file.path; - const newPath = dir + req.file.filename; + const newPath = dir + "/" + req.file.filename; fs.rename(oldPath, newPath, function (err) { if (err) throw err