public function bellowSizeLimit($file)
    {
        $content = @file_get_contents($file['tmp_name']);
        $filesize = strlen($content);
        $uploadlimit = $this->_max_upload_limit * 1024 * 1024;

        if ($filesize > $uploadlimit) {
            throw new LibBaseControllerExceptionBadRequest('Exceed maximum size');
        }

        return true;
    }
public function bellowSizeLimit($file)
    {
        $content = @file_get_contents($file['tmp_name']);
        $filesize = strlen($content);
        $uploadlimit = $this->_max_upload_limit * 1024 * 1024;

        if ($filesize > $uploadlimit) {
            throw new LibBaseControllerExceptionBadRequest('Exceed maximum size');
        }

        return true;
    }
public function bellowSizeLimit ( $ file ) { $ content = @ file_get_contents ( $ file [ 'tmp_name' ] ) ; $ filesize = strlen ( $ content ) ; $ uploadlimit = $ this -> _max_upload_limit * 1024 * 1024 ; if ( $ filesize > $ uploadlimit ) { throw new LibBaseControllerExceptionBadRequest ( 'Exceed maximum size' ) ; } return true ; }
Checks to see whether the uploaded file exceeds the allowed limit.

@param posted file request

@return bool
Checks to see whether the uploaded file exceeds the allowed limit .