function file_upload_max_size

Same name in other branches
  1. 7.x includes/file.inc \file_upload_max_size()

Determines the maximum file upload size by querying the PHP settings.

Return value

A file size limit in bytes based on the PHP upload_max_filesize and post_max_size

Deprecated

in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\Component\Utility\Environment::getUploadMaxSize() instead.

Related topics

1 call to file_upload_max_size()
FileSystemDeprecationTest::testDeprecatedFileUploadMaxSize in core/tests/Drupal/KernelTests/Core/File/FileSystemDeprecationTest.php
@expectedDeprecation file_upload_max_size() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Component\Utility\Environment::getUploadMaxSize() instead. See https://www.drupal.org/node/3000058.

File

core/includes/file.inc, line 1005

Code

function file_upload_max_size() {
    @trigger_error('file_upload_max_size() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\Component\\Utility\\Environment::getUploadMaxSize() instead. See https://www.drupal.org/node/3000058.', E_USER_DEPRECATED);
    return Environment::getUploadMaxSize();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.