From c5a9b6308607b11567304dcaaf5fa2b9a48b3956 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 13 Apr 2024 07:25:04 -0400 Subject: [PATCH] file path error --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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