Open jguillod opened 11 years ago
Hi @jguillod, thanks for the feedback. What you suggest definitely sounds like it will be an improvement. I started implementing this change, but I haven't had time to publish it yet. Hopefully I'll get it out soon.
Thanks again, thrackle
@thrackle This code will work :)
try {
await Promise.all(persedFiles.map(file => fs.promises.access(file.path)));
} catch (error) {
return res.status(404).send();
}
I got the following error with Node aborting when trying to
response.zip()
an unexisting file path:This exits Node even if we call the
response.zip()
function inside atry... catch...
statment.Could you deal with it by calling the error callback or some other way in order not to abort the Node server?
Of course I will test the file existance with
fs.existsSync()
…Thanks a lot for this easy to use module!