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 committed 2013-12-06 21:18:52 +02:00
1 parent 134914dc1a
commit 02fd940124
1 file changed
+1 -1
+1 -1
View File
@@ -276,7 +276,7 @@ class GetFileControllerCore extends FrontController
/* Set headers for download */ /* Set headers for download */
header('Content-Transfer-Encoding: binary'); header('Content-Transfer-Encoding: binary');
header('Content-Type: '.$mimeType); header('Content-Type: '.$mimeType);
header('Content-Length: '.filesize($file)); header('Content-Length: '.sprintf('%u', filesize($file)));
header('Content-Disposition: attachment; filename="'.$filename.'"'); header('Content-Disposition: attachment; filename="'.$filename.'"');
$fp = fopen($file, 'rb'); $fp = fopen($file, 'rb');
while (!feof($fp)) while (!feof($fp))