file paths fix
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user