public class UploadErrorEvent extends UploadEvent
UploadErrorHandler and register it via the .Uploader#setUploadErrorHandler(UploadErrorHandler)
method in order to access uploader error events.
Note that the 'uploadError' event is fired any time an uploader is interrupted or does not complete successfully. The error code parameter indicates the type of error that occurred.
Stopping, Cancelling or returning 'false' from uploadStart will cause uploadError to fire. Uploader error will not fire for files that are cancelled but still waiting in the queue.
| Modifier and Type | Class and Description |
|---|---|
static class |
UploadErrorEvent.ErrorCode
An enumeration of reported uploaded error code types.
|
| Constructor and Description |
|---|
UploadErrorEvent(File file,
int errorCode,
java.lang.String message,
java.lang.String serverData)
This constructor is intended for internal use only.
|
| Modifier and Type | Method and Description |
|---|---|
UploadErrorEvent.ErrorCode |
getErrorCode()
The error code returned by the Uploader component in the case of an uploader failure,
conveniently converted to an enumeration type.
|
int |
getErrorCodeAsInt()
The original numeric error code returned by the Uploader component in the case of an
uploader failure.
|
java.lang.String |
getMessage()
Return a human readable error message explaining the cause of the uploader failure.
|
java.lang.String |
getServerData()
Return a server response (if any).
|
getFilepublic UploadErrorEvent(File file, int errorCode, java.lang.String message, java.lang.String serverData)
UploadErrorHandler.file - The native javascript object containing the details of the file being
uploaded.errorCode - The error code returned by the Uploader component in the case of an
uploader failure.message - A human readable error message explaining the cause of the uploader failure.serverData - Server response (if any).public UploadErrorEvent.ErrorCode getErrorCode()
public int getErrorCodeAsInt()
public java.lang.String getMessage()
public java.lang.String getServerData()