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, UploadManager.FileRejectionReason reason, String fileName) Creates a new event. -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the rejected file.Gets the reason why the file was rejected.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, UploadManager.FileRejectionReason reason, String fileName) Creates a new event.- Parameters:
source- the source componentfromClient- whether the event originated from the clientreason- the reason why the file was rejectedfileName- the name of the rejected file
-
-
Method Details
-
getFileName
Gets the name of the rejected file.- Returns:
- the file name
-
getReason
Gets the reason why the file was rejected.- Returns:
- the rejection reason
-