Updated file not found error message in /stream

pull/873/head
Tzahi12345 3 years ago
parent 0e190fca2a
commit 2df4dc1bfc

@ -1638,7 +1638,7 @@ app.get('/api/stream', optionalJwt, async (req, res) => {
else file_path = null;
}
if (!fs.existsSync(file_path)) {
logger.error(`File ${file_path} could not be found! UID: ${uid}, ID: ${file_obj.id}`);
logger.error(`File ${file_path} could not be found! UID: ${uid}, ID: ${file_obj && file_obj.id}`);
}
const stat = fs.statSync(file_path);
const fileSize = stat.size;

Loading…
Cancel
Save