Contao\FileUpload::getMaximumUploadSize PHP Method

getMaximumUploadSize() protected method

Return the maximum upload file size in bytes
protected getMaximumUploadSize ( ) : string
return string
    protected function getMaximumUploadSize()
    {
        // Get the upload_max_filesize from the php.ini
        $upload_max_filesize = ini_get('upload_max_filesize');
        // Convert the value to bytes
        if (stripos($upload_max_filesize, 'K') !== false) {
            $upload_max_filesize = round($upload_max_filesize * 1024);
        } elseif (stripos($upload_max_filesize, 'M') !== false) {
            $upload_max_filesize = round($upload_max_filesize * 1024 * 1024);
        } elseif (stripos($upload_max_filesize, 'G') !== false) {
            $upload_max_filesize = round($upload_max_filesize * 1024 * 1024 * 1024);
        }
        return min($upload_max_filesize, \Config::get('maxFileSize'));
    }