Helpful
    Preparing search index...

    Represents a file select that is opened from an input.

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Initializes a new instance of this object.

      Parameters

      • _doc: Document = $global.document

        The root document that can be used to create the file dialog.

      • _container: HTMLElement = _doc.body

        The container to house the input element.

      Returns ZFileSelect

    Methods

    • Opens the file dialog.

      Note that this uses the older node callback style rather than returning a promise. This is intentional due to how this object opens a file select. Since there is no way to determine if the user canceled the dialog, returning a promise would actually potentially result in a memory leak since it would never get resolved. Therefore, the class callback style has to be used here.

      Parameters

      • accept: string

        The file mime types to accept.

      • cb: (file: File) => void

        The callback for when the user selects a file.

      Returns void