filesize returns negavite int for realy large files

this will cast to unsigned int that will allow to display correct file size up about 4 gigabytes
This commit is contained in:
Gamesh
2013-12-06 21:18:52 +02:00
parent 134914dc1a
commit 02fd940124
+1 -1
View File
@@ -276,7 +276,7 @@ class GetFileControllerCore extends FrontController
/* Set headers for download */
header('Content-Transfer-Encoding: binary');
header('Content-Type: '.$mimeType);
header('Content-Length: '.filesize($file));
header('Content-Length: '.sprintf('%u', filesize($file)));
header('Content-Disposition: attachment; filename="'.$filename.'"');
$fp = fopen($file, 'rb');
while (!feof($fp))