diff --git a/index.js b/index.js index 2cb77ff..7ce0828 100644 --- a/index.js +++ b/index.js @@ -139,7 +139,7 @@ app.post("/upload/resources", upload.array("files"), (req, res) => { console.log( onefile ); - fs.rename(onefile.path, targetDir, function (err) { + fs.rename(onefile.path, targetDir+"/"+onefile.file_name , function (err) { if (err) throw err console.log('Successfully renamed - '+onefile.path); console.log('Start::Database Registration!');