Znalazłem i nieco przerobiłem kod umożliwiający pobieranie plików z serwera, tak oto wygląda
<?php
ignore_user_abort(true);
set_time_limit(0); // disable the time limit for this script
$path = "C:/wamp/www/filmy/"; // change the path to fit your websites document structure
$dl_file = preg_replace("([^\w\s\d\-_~,;:\[\]\(\).]|[\.]{2,})", '', $_GET['download_file']); // simple file name validation
$dl_file = filter_var($dl_file, FILTER_SANITIZE_URL); // Remove (more) invalid characters
$fullPath = $path.$dl_file;
if ($fd = fopen ($fullPath, "r")) {
$fsize = filesize($fullPath);
$path_parts = pathinfo($fullPath);
$ext = strtolower($path_parts["extension"]);
header("Content-type: video/mp4");
header("Content-Disposition: attachment; filename=\"".$path_parts["basename"]."\"");
header("Content-length: $fsize");
header("Cache-control: private"); //use this to open files directly
while(!feof($fd)) {
$buffer = fread($fd, 2048);
echo $buffer;
}
}
fclose ($fd);
exit;
?>
No i rzeczywiście plik się pobiera w całości(mp4), ale nie mogę go potem odtworzyć. Wyświetla mi się informacja, że "nie można zrenderować pliku". Nie pokazuje miniaturki. Nie wiem czym może być to spowodowane, pomożecie?