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:
parent
9576880e00
commit
4078b4db45
|
@ -75,8 +75,11 @@ app.post("/upload", upload.array("uploads[]", 12), function (req, res) {
|
|||
res.status(500).send(getResponse(500, "No proper file type"));
|
||||
} else {
|
||||
res.download(filepath);
|
||||
setTimeout(function() {
|
||||
deleteFile(filepath);
|
||||
}, 3000);
|
||||
// deleteFile(filepath);
|
||||
}
|
||||
deleteFile(filepath);
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue