file path error
This commit is contained in:
@@ -74,7 +74,7 @@ app.post('/upload/task', upload.single('file'), (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const oldPath = req.file.path;
|
const oldPath = req.file.path;
|
||||||
const newPath = dir + req.file.filename;
|
const newPath = dir + "/" + req.file.filename;
|
||||||
|
|
||||||
fs.rename(oldPath, newPath, function (err) {
|
fs.rename(oldPath, newPath, function (err) {
|
||||||
if (err) throw err
|
if (err) throw err
|
||||||
|
|||||||
Reference in New Issue
Block a user