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',
|
||||
},
|
||||
};
|
||||
res.status(200).sendFile(filePath, sendFileOptions, (error) => {
|
||||
if (error) {
|
||||
logger.warn(filePath, error);
|
||||
res.status(404).send();
|
||||
}
|
||||
});
|
||||
res.status(200).sendFile(filePath, sendFileOptions);
|
||||
};
|
||||
|
||||
module.exports = serveFile;
|
||||
|
|
Loading…
Reference in a new issue