This commit is contained in:
CHIEFSOFT\ameye
2024-03-23 14:32:36 -04:00
parent 54ee2ed2b6
commit 68ea343090
+4
View File
@@ -10,6 +10,8 @@ const videoFileMap={
'get-post':'videos/v3.mp4',
}
console.log("Finding File");
var corsOptions = {
origin: ['http://localhost:3000',
'http://localhost:3040',
@@ -36,6 +38,8 @@ app.get('/videos/:filename',cors(corsOptions), (req, res)=>{
return res.status(404).send('File not found')
}
console.log("Finding File Found ", filePath);
const stat = fs.statSync(filePath);
const fileSize = stat.size;
const range = req.headers.range;