Inizio dockerizzazione
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
require_once(dirname(__FILE__)."/load.php");
|
||||
|
||||
// $sizes = array(
|
||||
// "large"=>array("width"=>800,"height"=>600),
|
||||
// "small"=>array("width"=>160,"height"=>120)
|
||||
// );
|
||||
|
||||
if (array_key_exists("id",$_GET)) {
|
||||
$video = GlobalVariables::get("dao")->getFirst("MediaModel",array("id"=>$_GET['id']));
|
||||
|
||||
if (!is_null($video)){
|
||||
$basepath = GlobalVariables::get("config")->paths->media;
|
||||
$videoPath= $basepath."/".$video->id.".".$video->extension;
|
||||
$lenght = filesize($videoPath);
|
||||
|
||||
|
||||
header('Content-Type: '.mime_content_type($videoPath));
|
||||
header('Content-Lenght: '.$lenght);
|
||||
readfile($videoPath);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user