Function chooseFile

Opens a file chooser dialog and allows the user to select a file.

  • Parameters

    • Optionalaccept: string

      Optional file type filter. Can be a comma-separated list of MIME types or file extensions.

    Returns Promise<null | File>

    A promise that resolves with the selected file or null if the selection was canceled.