Handles file uploads via HTTP POSTs. Handling the upload is a three-step process. First, you need to create an instance of the class, passing it the upload array and optional destination directory and upload array index. After that, you check if the upload completed successfully, and based on that check, either move the file to the permanent location or emit an error message.
OnInit | Fired when the object is created. |
InitComplete | Fired after object is initialized. |
OnMove | Fired before moving the uploaded file to its destination. |
MoveComplete | Fired after the file is successfully moved. |
Get a status code for the file upload.
An integer representing the upload status.
Determines the status of the upload.
True if the file uploaded without error, false otherwise.
Moves the file from the upload directory to the permanent location.
True on success, false otherwise.
function errorMessage( |
| ) |
Gets a message associated with the status of the upload.
err | Optional status code for which to get the message. The default is to use the error property of the object. |
A string containing the appropriate message.