public static function UploadedFile::getMaxFilesize

Returns the maximum size of an uploaded file as configured in php.ini

Return value

int The maximum size of an uploaded file in bytes

1 call to UploadedFile::getMaxFilesize()
Client::filterFiles in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php
Filters an array of files.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php, line 204

Class

UploadedFile
A file uploaded through a form.

Namespace

Symfony\Component\HttpFoundation\File

Code

public static function getMaxFilesize() {
  $max = trim(ini_get('upload_max_filesize'));
  if ('' === $max) {
    return PHP_INT_MAX;
  }
  switch (strtolower(substr($max, -1))) {
    case 'g':
      $max *= 1024;
    case 'm':
      $max *= 1024;
    case 'k':
      $max *= 1024;
  }
  return (int) $max;
}