UploadService:

add timer before deleting the file (sometimes it was deleting the file, before read it)



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@56752 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-07-24 12:49:32 +00:00
parent 9576880e00
commit 4078b4db45
1 changed files with 4 additions and 1 deletions

View File

@ -75,8 +75,11 @@ app.post("/upload", upload.array("uploads[]", 12), function (req, res) {
res.status(500).send(getResponse(500, "No proper file type")); res.status(500).send(getResponse(500, "No proper file type"));
} else { } else {
res.download(filepath); res.download(filepath);
} setTimeout(function() {
deleteFile(filepath); deleteFile(filepath);
}, 3000);
// deleteFile(filepath);
}
}); });