Represents a file that did not successfully upload.
Errors occur when the client did something wrong. The possible causes are:
see | which occurs when the server went wrong or the client appears to be circumventing PHP file upload safeguards. |
---|---|
package | Haldayne |
changeErrorMessage(integer $code, string $message)
You may want to localize or otherwise change the generic error associated with one of the upload error codes. You may only change messages for the following upload error codes:
upload_max_filesize
directive.MAX_FILE_SIZE
directive in the HTML form.api | |
---|---|
since | 1.0.0 |
integer
The code whose message you want to change.
string
The new message for that code.
\OutOfBoundsException |
If the given code does not have a message |
---|
getErrorMessage()
see | To adjust the message globally. |
---|---|
api | |
since | 1.0.0 |
getHtmlName() : string
api | |
---|---|
since | 1.0.0 |
string
isPartial(integer $received = null
) : boolean
api | |
---|---|
since | 1.0.0 |
integer
The number of bytes received.
boolean
isTooBig(integer $maximum = null
) : boolean
An upload may exceed either the upload_max_filesize
setting or the
MAX_FILE_SIZE
input. This method handles both cases and returns true
if either of these limits was reached. In such a case, the optional
pass-by-reference $maximum
will indicate the maximum possible size.
api | |
---|---|
since | 1.0.0 |
integer
The server or form allowed maximum file size, in bytes.
boolean
notUploaded() : boolean
api | |
---|---|
since | 1.0.0 |
boolean
$code : integer
$htmlName : string
$size : integer