public interface UploadStartHandler
uploader.setUploadStartHandler(new UploadStartHandler() {
public boolean onUploadStart(UploadStartEvent event) {
Window.alert("Beginning uploader of " + event.getFile().getName());
return true;
}
});
Note that the 'uploadStart' event is called immediately before the file is uploaded. This event provides an opportunity to perform any last minute validation, add post params or do any other work before the file is uploaded.
The uploader can be cancelled by returning 'false' from uploadStart in the handler. If you return 'true' or do not return any value then the uploader proceeds. Returning 'false' will cause an uploadError event to fired.
See the documentation on the UploadStartEvent class for more details on the data
available when an uploader start event occurs.
| Modifier and Type | Method and Description |
|---|---|
boolean |
onUploadStart(UploadStartEvent uploadStartEvent)
This method is fired whenever a uploader start event occurs in the Uploader component.
|
boolean onUploadStart(UploadStartEvent uploadStartEvent)
UploadStartEvent class for more details on the data available when this event is
fired.uploadStartEvent - The details of the event that occurred.