removing sendFile error catch
This commit is contained in:
parent
a82f5990f4
commit
33b96099ad
1 changed files with 1 additions and 6 deletions
|
@ -8,12 +8,7 @@ const serveFile = ({ filePath, fileType }, res) => {
|
||||||
'Content-Type' : fileType || 'image/jpeg',
|
'Content-Type' : fileType || 'image/jpeg',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
res.status(200).sendFile(filePath, sendFileOptions, (error) => {
|
res.status(200).sendFile(filePath, sendFileOptions);
|
||||||
if (error) {
|
|
||||||
logger.warn(filePath, error);
|
|
||||||
res.status(404).send();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = serveFile;
|
module.exports = serveFile;
|
||||||
|
|
Loading…
Reference in a new issue