diff --git a/index.js b/index.js index 6c13dd6..494d1f8 100644 --- a/index.js +++ b/index.js @@ -51,14 +51,15 @@ app.get('/videos/:filename', (req, res)=>{ const filePath = videoFileMap[fileName] - if(!filePath){ - console.log("Finding File Not Found ", filePath); + const completeFile = process.env.COMMON_MEDIA_PATH + filePath; + if(!completeFile){ + console.log("Finding File Not Found ", completeFile); return res.status(404).send('File not found') } - console.log("Finding File Found ", filePath); + console.log("Finding File Found ", completeFile); + - const completeFile = process.env.COMMON_MEDIA_PATH + filePath; const stat = fs.statSync(completeFile); const fileSize = stat.size;