Package com.vaadin.flow.component.upload
Class UploadManager.FileRejectedEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<Component>
com.vaadin.flow.component.upload.UploadManager.FileRejectedEvent
- All Implemented Interfaces:
Serializable
- Enclosing class:
UploadManager
Event fired when a file is rejected by the upload manager due to
constraints like max file size, max files, or accepted file types. The
event source is the owner component passed to the
UploadManager
constructor.- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionFileRejectedEvent(Component source, boolean fromClient, String errorMessage, String fileName) Creates a new event. -
Method Summary
Modifier and TypeMethodDescriptionGets the error message describing why the file was rejected.Gets the name of the rejected file.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
FileRejectedEvent
public FileRejectedEvent(Component source, boolean fromClient, String errorMessage, String fileName) Creates a new event.- Parameters:
source- the source componentfromClient- whether the event originated from the clienterrorMessage- the error messagefileName- the name of the rejected file
-
-
Method Details
-
getFileName
Gets the name of the rejected file.- Returns:
- the file name
-
getErrorMessage
Gets the error message describing why the file was rejected.- Returns:
- the error message
-