com.vaadin.flow.component.upload.

Class FailedEvent

    • Constructor Detail

      • FailedEvent

        public FailedEvent(Upload source,
                           String filename,
                           String MIMEType,
                           long length,
                           Exception reason)

        Parameters:

        source - the source of the file.

        filename - the received file name.

        MIMEType - the MIME type of the received file.

        length - the number of uploaded bytes

        reason - exception that failed the upload

      • FailedEvent

        public FailedEvent(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 number of uploaded bytes

    • Method Detail

      • getReason

        public Exception getReason()

        Gets the exception that caused the failure.

        Returns:

        the exception that caused the failure, null if n/a

      • getContentLength

        public long getContentLength()

        Gets the number of uploaded bytes.

        Overrides:

        getContentLength in class FinishedEvent

        Returns:

        the number of uploaded bytes