Class ProgressUpdateEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<Upload>
com.vaadin.flow.component.upload.ProgressUpdateEvent
All Implemented Interfaces:
Serializable

public class ProgressUpdateEvent extends ComponentEvent<Upload>
ProgressUpdateEvent is sent to track progress of upload.
Author:
Vaadin Ltd.
See Also:
  • Constructor Details

    • ProgressUpdateEvent

      @Deprecated(since="24.4") public ProgressUpdateEvent(Upload source, long readBytes, long contentLength)
      Event constructor method to construct a new progress event.
      Parameters:
      source - the source of the file
      readBytes - bytes transferred
      contentLength - total size of file currently being uploaded, -1 if unknown
    • ProgressUpdateEvent

      public ProgressUpdateEvent(Upload source, long readBytes, long contentLength, String fileName)
      Event constructor method to construct a new progress event.
      Parameters:
      source - the source of the file
      readBytes - bytes transferred
      contentLength - total size of file currently being uploaded, -1 if unknown
      fileName - name of file currently being uploaded
  • Method Details

    • getUpload

      public Upload getUpload()
      Upload where the event occurred.
      Returns:
      the Source of the event
    • getReadBytes

      public long getReadBytes()
      Get bytes transferred for this update.
      Returns:
      bytes transferred
    • getContentLength

      public long getContentLength()
      Get total file size.
      Returns:
      total file size or -1 if unknown
    • getFileName

      public String getFileName()
      Get the file name.
      Returns:
      file name