public interface UploadSuccessHandler
uploader.setUploadSuccessHandler(new UploadSuccessHandler() {
public boolean onUploadSuccess(UploadSuccessEvent event) {
Window.alert("Successfully uploaded " + event.getFile().getName());
return true;
}
});
Note that 'uploadSuccess' is fired when the entire uploader has been transmitted and the server returns a HTTP 200 status code. Any data outputted by the server is available in the server data property.
Due to some bugs in the Flash Player the server response may not be acknowledged and no
uploadSuccess
event is fired by Flash. In this case the .Uploader#setAssumeSuccessTimeout(long)
setting is checked to see if enough time has passed to fire uploadSuccess anyway. In this
case the received response parameter will be false.
The Uploader.setHttpSuccess(long...) setting allows
uploadSuccess to be fired for HTTP status codes other than 200. In this case no server data is
available from the Flash Player.
At this point the uploader is not yet complete. Another uploader cannot be started from uploadSuccess.
See the documentation on the UploadSuccessEvent class for more details on the data
available when an uploader success event occurs.
| Modifier and Type | Method and Description |
|---|---|
boolean |
onUploadSuccess(UploadSuccessEvent uploadSuccessEvent)
This method is fired whenever a uploader success event occurs in the Uploader component.
|
boolean onUploadSuccess(UploadSuccessEvent uploadSuccessEvent)
UploadSuccessEvent class for more details on the data available when this event
is fired.uploadSuccessEvent - The details of the event that occurred.