Function __global->get_max_file_size

Definitions

sources/files2.php

  • Get the maximum allowed upload filesize, as specified in the configuration.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$source_member ?MEMBER No No Null N/A N/A Member we consider quota for (null: do not consider quota because we are not dealing with attachments)
$db ?object No No Null N/A N/A Database connector to get quota from (null: site DB)
$consider_php_limits boolean No No True N/A N/A Whether to consider limitations in PHP's configuration

Returns

  • The maximum allowed upload filesize, in bytes
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the maximum allowed upload filesize, as specified in the configuration.
 *
 * @param  ?MEMBER $source_member Member we consider quota for (null: do not consider quota because we are not dealing with attachments)
 * @param  ?object $db Database connector to get quota from (null: site DB)
 * @param  boolean $consider_php_limits Whether to consider limitations in PHP's configuration
 * @return integer The maximum allowed upload filesize, in bytes
 */

function get_max_file_size(?int $source_member = null, ?object $db = null, bool $consider_php_limits = true) : int