file paths fix
This commit is contained in:
@@ -51,14 +51,15 @@ app.get('/videos/:filename', (req, res)=>{
|
|||||||
|
|
||||||
|
|
||||||
const filePath = videoFileMap[fileName]
|
const filePath = videoFileMap[fileName]
|
||||||
if(!filePath){
|
const completeFile = process.env.COMMON_MEDIA_PATH + filePath;
|
||||||
console.log("Finding File Not Found ", filePath);
|
if(!completeFile){
|
||||||
|
console.log("Finding File Not Found ", completeFile);
|
||||||
return res.status(404).send('File not found')
|
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 stat = fs.statSync(completeFile);
|
||||||
const fileSize = stat.size;
|
const fileSize = stat.size;
|
||||||
|
|||||||
Reference in New Issue
Block a user