Return information about the upload configuration.

Some values come directly from the PHP configuration. Others are calculated using the PHP configuration and run-time information.

see
package Haldayne

 Methods

What is the maximum file size reported for the submitted form?

formMaxUploadBytes() : integer
APIStatic

If you include a hidden input element named MAX_FILE_SIZE in your form, then all file inputs that come after that hidden input element will be limited to the number of bytes given in the MAX_FILE_SIZE.

If the number of returned bytes equals PHP_INT_MAX, there is effectively no limit.

api
since 1.0.0

Returns

integerBytes

Are file uploads enabled?

isEnabled() : boolean
APIStatic

Specified at the system level by the file_uploads ini directive.

api
since 1.0.0

Returns

boolean

How many simultaneous file uploads do we support?

maxFileUploads() : integer
APIStatic

If the number of returned uploads equals PHP_INT_MAX, there is effectively no limit.

api
since 1.0.0

Returns

integerNumber of uploads

What is the maximum file size supported system-wide?

systemMaxUploadBytes() : integer
APIStatic

Controlled by the system-level directive upload_max_filesize, but also constrained by the system-level directive post_max_size. The lower of the two values defines the upper limit of the maximum file size.

If the number of returned bytes equals PHP_INT_MAX, there is effectively no limit.

api
since 1.0.0

Returns

integerBytes

In what directory will uploads be held for processing?

uploadWorkingPath() : string | null
APIStatic

Specified at the system level by the upload_tmp_dir ini directive. If that directory isn't writeable, then PHP falls back to the system temporary directory, which is specified at the system level by the sys_temp_dir ini directive (and we can just ask sys_get_temp_dir).

api
since 1.0.0

Returns

stringnull

Given two values which follow the "0 or fewer is unlimited" pattern, return the limiting number or PHP_INT_MAX if neither would limit.

limit(integer $a, integer $b) 
Static

Parameters

$a

integer

$b

integer