/** * return max size for file upload in bytes * @return int $bytes */ public static function getNativeMaxUpload() { $upload_max_filesize = upload::getBytesFromGreek(ini_get('upload_max_filesize')); $post_max_size = upload::getBytesFromGreek(ini_get('post_max_size')); if ($upload_max_filesize >= $post_max_size) { return $post_max_size; } else { return $upload_max_filesize; } }