Class ClipboardFile

java.lang.Object
com.vaadin.flow.component.page.ClipboardFile
All Implemented Interfaces:
Serializable

public class ClipboardFile extends Object implements Serializable
Represents a file received from a clipboard paste event.

Contains the file name, MIME type, size, and raw byte data of the pasted file.

See Also:
  • Method Details

    • getName

      public String getName()
      Gets the name of the file.
      Returns:
      the file name
    • getMimeType

      public String getMimeType()
      Gets the MIME type of the file.
      Returns:
      the MIME type, e.g. "image/png"
    • getSize

      public long getSize()
      Gets the size of the file in bytes.
      Returns:
      the file size
    • getData

      public byte[] getData()
      Gets the raw byte data of the file.
      Returns:
      the file data