com.vaadin.flow.component.upload.

Class FinishedEvent

  • All Implemented Interfaces:

    Serializable

    Direct Known Subclasses:

    FailedEvent, SucceededEvent


    public class FinishedEvent
    extends ComponentEvent<Upload>

    Upload.FinishedEvent is sent when the upload receives a file, regardless of whether the reception was successful or failed. If you wish to distinguish between the two cases, use either SucceededEvent or FailedEvent, which are both subclasses of the FinishedEvent.

    Author:

    Vaadin Ltd.

    See Also:

    Serialized Form

    • Constructor Detail

      • FinishedEvent

        public FinishedEvent(Upload source,
                             String fileName,
                             String MIMEType,
                             long length)

        Parameters:

        source - the source of the file.

        fileName - the received file name.

        MIMEType - the MIME type of the received file.

        length - the length of the received file.

    • Method Detail

      • getUpload

        public Upload getUpload()

        Uploads where the event occurred.

        Returns:

        the Source of the event.

      • getFileName

        public String getFileName()

        Gets the file name.

        Returns:

        the fileName.

      • getMIMEType

        public String getMIMEType()

        Gets the MIME Type of the file.

        Returns:

        the MIME type.

      • getContentLength

        public long getContentLength()

        Gets the length of the file.

        Returns:

        the length.