fix file path
This commit is contained in:
@@ -133,13 +133,13 @@ app.post("/upload/resources", upload.array("files"), (req, res) => {
|
||||
if (!fs.existsSync(targetDir)) {
|
||||
fs.mkdirSync(targetDir);
|
||||
}
|
||||
let finalTargetFile = targetDir+"/"+onefile.file_name;
|
||||
|
||||
console.log(finalTargetFile);
|
||||
|
||||
req.files.map(( onefile )=>{
|
||||
{
|
||||
//===============================================
|
||||
|
||||
let finalTargetFile = targetDir+"/"+onefile.file_name;
|
||||
console.log( onefile );
|
||||
|
||||
fs.rename(onefile.path, finalTargetFile , function (err) {
|
||||
|
||||
Reference in New Issue
Block a user