Class UploadManager.FileRejectedEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<com.vaadin.flow.component.Component>
com.vaadin.flow.component.upload.UploadManager.FileRejectedEvent
All Implemented Interfaces:
Serializable
Enclosing class:
UploadManager

public static class UploadManager.FileRejectedEvent extends com.vaadin.flow.component.ComponentEvent<com.vaadin.flow.component.Component>
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:
  • Constructor Details

    • FileRejectedEvent

      public FileRejectedEvent(com.vaadin.flow.component.Component source, boolean fromClient, String errorMessage, String fileName)
      Creates a new event.
      Parameters:
      source - the source component
      fromClient - whether the event originated from the client
      errorMessage - the error message
      fileName - the name of the rejected file
  • Method Details

    • getFileName

      public String getFileName()
      Gets the name of the rejected file.
      Returns:
      the file name
    • getErrorMessage

      public String getErrorMessage()
      Gets the error message describing why the file was rejected.
      Returns:
      the error message