I use the following code to make sure uploaded files are not smaller than or less than a certain size but when someone uploads a file larger than 2GB it triggers PHP to throw of the following error anyway.
'The uploaded file is to small'
What is the best way for me to fix this?
$sizes= filesize($file['tmp_name']);
//File size is less than 40KB so error is threw
if($sizes < 40*1024) {
$this->setError(JText::_('The uploaded file is to small'));
return false;
}