Jet\IO_UploadedFile
The class, as the name suggests, represents a file uploaded to the server that can be further processed. It is a general class that is used in the InputCatcher, Validator, and forms subsystems.
| Method | Meaning |
|---|---|
| public __construct( string $file_name, string $tmp_file_path ) |
Parameters:
|
| public getFileName( ) : string |
Returns the name of the uploaded file. |
| public getTmpFilePath( ) : string |
Returns the path to the TMP file where the content of the uploaded file is temporarily stored. |
| public setError( string $error_code, string $error_message ) : void |
Sets an error for the given uploaded file. For example, when it is an unallowed file type, or the file is too large, and similar cases. |
| public hasError( ) : bool |
Indicates whether an error has been set on the file. |
| public getErrors( ) : array |
Returns the list of errors set on the file. |
| public getSize( ) : int |
Returns the actual size of the uploaded file. |
| public getMimeType( ) : string |
Returns the actual MIME type of the uploaded file. |
| public getExtension( ) : string |
Returns the file extension (.jpg, .txt, .doc, and similar). |