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:
1 parent
134914dc1a
commit
02fd940124
1 file changed
+1
-1
@@ -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))
|
||||||
|
|||||||
Reference in new issue
Block a user