public function getErrorMessage()
    {
        switch ($this->raw['error']) {
            case UPLOAD_ERR_OK:
                return null;
            case UPLOAD_ERR_INI_SIZE:
                return 'The uploaded file exceeds the upload_max_filesize directive in php.ini.';
            case UPLOAD_ERR_FORM_SIZE:
                return 'The uploaded file exceeds the MAX_FILE_SIZE directive specified in HTML form.';
            case UPLOAD_ERR_PARTIAL:
                return 'The uploaded file was only partially uploaded.';
            case UPLOAD_ERR_NO_FILE:
                return 'No file was uploaded.';
            case UPLOAD_ERR_NO_TMP_DIR:
                return 'Missing a temporary folder.';
            case UPLOAD_ERR_CANT_WRITE:
                return 'Failed to write file to disk.';
            case UPLOAD_ERR_EXTENSION:
                return 'A PHP extension stopped the file upload.';
            default:
                return 'Unknown error occurred.';
        }
    }
public function getErrorMessage()
    {
        switch ($this->raw['error']) {
            case UPLOAD_ERR_OK:
                return null;
            case UPLOAD_ERR_INI_SIZE:
                return 'The uploaded file exceeds the upload_max_filesize directive in php.ini.';
            case UPLOAD_ERR_FORM_SIZE:
                return 'The uploaded file exceeds the MAX_FILE_SIZE directive specified in HTML form.';
            case UPLOAD_ERR_PARTIAL:
                return 'The uploaded file was only partially uploaded.';
            case UPLOAD_ERR_NO_FILE:
                return 'No file was uploaded.';
            case UPLOAD_ERR_NO_TMP_DIR:
                return 'Missing a temporary folder.';
            case UPLOAD_ERR_CANT_WRITE:
                return 'Failed to write file to disk.';
            case UPLOAD_ERR_EXTENSION:
                return 'A PHP extension stopped the file upload.';
            default:
                return 'Unknown error occurred.';
        }
    }
public function getErrorMessage ( ) { switch ( $ this -> raw [ 'error' ] ) { case UPLOAD_ERR_OK : return null ; case UPLOAD_ERR_INI_SIZE : return 'The uploaded file exceeds the upload_max_filesize directive in php.ini.' ; case UPLOAD_ERR_FORM_SIZE : return 'The uploaded file exceeds the MAX_FILE_SIZE directive specified in HTML form.' ; case UPLOAD_ERR_PARTIAL : return 'The uploaded file was only partially uploaded.' ; case UPLOAD_ERR_NO_FILE : return 'No file was uploaded.' ; case UPLOAD_ERR_NO_TMP_DIR : return 'Missing a temporary folder.' ; case UPLOAD_ERR_CANT_WRITE : return 'Failed to write file to disk.' ; case UPLOAD_ERR_EXTENSION : return 'A PHP extension stopped the file upload.' ; default : return 'Unknown error occurred.' ; } }
Returns error message

@return null|string
Returns error message