Class FilePickerBuilder<IsMultiSelect>

Type Parameters

  • IsMultiSelect extends boolean

Constructors

Methods

  • Add a button to the FilePicker Note: This overrides any previous setButtonFactory call

    Parameters

    Returns this

  • Add allowed MIME type

    Parameters

    • filter: string

      MIME type to allow

    Returns this

  • Allow to pick directories besides files

    Parameters

    • Optionalallow: boolean

      True to allow picking directories

    Returns this

  • Allow to pick directories besides files

    Returns this

  • Set the button factory which is used to generate buttons from current view, path and selected nodes Note: This overrides any previous addButton call

    Parameters

    Returns this

  • Set the container where the FilePicker will be mounted By default 'body' is used

    Parameters

    • container: string

      The dialog container

    Returns this

  • Add filter function to filter file list of FilePicker

    Parameters

    Returns this

  • Set allowed MIME types

    Parameters

    • filter: string[]

      Array of allowed MIME types

    Returns this

  • Enable or disable picking multiple files

    Type Parameters

    • T extends boolean

    Parameters

    • ms: T

      True to enable picking multiple files, false otherwise

    Returns FilePickerBuilder<T extends true
        ? true
        : false>

  • Set FilePicker type based on legacy file picker types

    Parameters

    Returns this

    Use addButton or setButtonFactory instead as with setType you do not know which button was pressed

  • Set starting path of the FilePicker

    Parameters

    • path: string

      Path to start from picking

    Returns this