Fixed file size check in FileService::download()
This commit is contained in:
parent
c8f0cb6e56
commit
c155cc3e5c
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ class FileService
|
|||
while (!feof($srcHandle))
|
||||
{
|
||||
$buffer = fread($srcHandle, 4 * 1024);
|
||||
if ($maxBytes !== null and ftell($dstHandle) > $maxBytes)
|
||||
if ($maxBytes !== null and strlen($result) > $maxBytes)
|
||||
{
|
||||
throw new \Exception(
|
||||
'File is too big (maximum size: %s)',
|
||||
|
|
Loading…
Reference in a new issue