/filer-dialogs

A set of web-native dialogs for selecting files and directories.

Mozilla Public License 2.0MPL-2.0

filer-dialogs

A set of web-native dialogs for selecting files and directories. It relies on js-platform/filer for an in-browser filesystem and replaces the native file and directory dialogs with cross-browser ones.

API Reference

FilerDialog.showOpenDialog(...)

Show an "Open" dialog and return the file(s)/directories selected by the user

Arguments:

allowMultipleSelection
Allows selecting more than one file at a time
chooseDirectories
Allows directories to be opened
title
The title of the dialog
initialPath
The folder opened inside the window initially. If initialPath is not set, or it doesn't exist, the window would show the last browsed folder depending on the OS preferences
fileTypes
List of extensions that are allowed to be opened, without leading ".". Null or empty array allows all files to be selected. Not applicable when chooseDirectories = true.
callback
Callback resolved with a FileSystemError string or the selected file(s)/directories. If the user cancels the open dialog, the error will be falsy and the file/directory array will be empty.