We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae9dc0f commit 1fa7f2aCopy full SHA for 1fa7f2a
index.php
@@ -397,7 +397,13 @@ function replaceVariables($str){
397
}
398
399
// return contents of file
400
- header('Content-Type: '.file_to_mime($file));
+ $mimeType = file_to_mime($file);
401
+ header('Content-Type: '.$mimeType);
402
+ if($mimeType === 'video/quicktime' || $mimeType === 'video/mp4' || $mimeType === 'video/x-m4v' || $mimeType === 'video/3gpp'){
403
+ // video files
404
+ header('Content-Length: '.filesize($file));
405
+ header('Accept-Ranges: bytes');
406
+ }
407
echo file_get_contents($file);
408
exit(0);
409
0 commit comments