Interface FileUploadControl

All Superinterfaces:
BackgroundStyleProperties, BootstrapButtonStyle, BorderStyleProperties, ButtonControl, ButtonControlProperties, Control, Element, EventOwner, MarginStyleProperties, MessageContainer, MessageProperties, PaddingStyleProperties, java.io.Serializable, TextStyleProperties, WebFormEventOwner

public interface FileUploadControl
extends ButtonControl
The FileUploadControl control provides functionality to select local files and upload them. Files can either be uploaded immediately or using the InitiateUploadControl.

Further documentation.

  • Method Details

    • isMultipleFilesSupported

      boolean isMultipleFilesSupported()
      Returns true if multiple files can be uploaded at once, otherwise returns false.

      Further documentation.

      Since:
      V5.10
    • setMultipleFilesSupported

      void setMultipleFilesSupported​(boolean multipleFilesSupported)
      If set to true, multiple files can be selected at once. If set to false, only one file can be selected.

      Further documentation.

      Since:
      V5.10
    • isReplaceDuplicateFiles

      boolean isReplaceDuplicateFiles()
      Returns true if files with duplicate names will be replaced, otherwise returns false. If false, a unique file will be created with _x appended to the original name. e.g myfile.txt is created as myfile_1.txt if the file already exists.

      Further documentation.

      Since:
      V5.10
    • setReplaceDuplicateFiles

      void setReplaceDuplicateFiles​(boolean replaceDuplicateFiles)
      If set to true, files with duplicate names will be replaced. If set to false, a unique file will be created with _x appended to the original name. e.g myfile.txt is created as myfile_1.txt if the file already exists.

      Further documentation.

      Since:
      V5.10
    • isImmediateUpload

      boolean isImmediateUpload()
      Returns true if selected files are immediately uploaded, otherwise returns false. If false, an InitiateUploadControl is required to upload the files.

      Further documentation.

      Since:
      V5.10
    • setImmediateUpload

      void setImmediateUpload​(boolean immediateUpload)
      If set to true, selected files are immediately uploaded. If set to false, an InitiateUploadControl is required to upload the files.

      Further documentation.

      Since:
      V5.10
    • getFileTypes

      java.lang.String getFileTypes()
      Returns a comma separated string of permitted file and MIME types. The file chooser displays only files of this type by default, but files of any type can be selected. Client-side validation will ensure that only files with a permitted extension can be uploaded.

      Further documentation.

      Since:
      V5.10
    • setFileTypes

      void setFileTypes​(java.lang.String fileTypes)
      Sets a comma separated string of permitted file and MIME types. The file chooser displays only files of this type by default, but files of any type can be selected. Client-side validation will ensure that only files with a permitted extension can be uploaded.

      Further documentation.

      Since:
      V5.10
    • getTargetDirectory

      java.lang.String getTargetDirectory()
      Returns the target directory as a relative or absolute path.

      Further documentation.

      Since:
      V5.10
    • setTargetDirectory

      void setTargetDirectory​(java.lang.String targetDirectory)
      Sets the target directory as a relative or absolute path.

      Further documentation.

      Since:
      V5.10
    • getMaximumFileSize

      java.lang.String getMaximumFileSize()
      Returns the maximum file size. This is a numerical value of bytes, or xK, xM, or xG for kilobytes, megabytes and gigabytes respectively. E.g. 50M is a maximum file size of 50 megabytes.

      Further documentation.

      Since:
      V5.10
    • setMaximumFileSize

      void setMaximumFileSize​(java.lang.String maximumFileSize)
      Sets the maximum file size. This is a numerical value of bytes, or xK, xM, or xG for kilobytes, megabytes and gigabytes respectively. E.g. 50M is a maximum file size of 50 megabytes.

      Further documentation.

      Since:
      V5.10
    • getFileItems

      FileItemIterator getFileItems()
      Returns an iterator through FileItems representing the uploaded files. See FileItem for more information.

      Further documentation.

      Since:
      V5.10
    • getAssociatedFileUploadTextControls

      java.util.ArrayList<com.ebasetech.ufs.runtime.controls.fileupload.FileUploadTextControl> getAssociatedFileUploadTextControls()
      Returns an ArrayList of all FileUploadText controls linked to this.

      Further documentation.

      Since:
      V5.10