UNPKG

@zodash/open-file

Version:

Open file dialog to select file in browser

32 lines (31 loc) 619 B
export interface IOptions { /** * Accept MimeType, support * * image/* * image/png * image/jpg * video/* * text/markdown * application/json * ... * * see more according @zodash/mime */ accept?: string; mimeTypes?: string[]; /** * Support mutiple file */ multiple?: boolean; /** * Support directory */ isDirectory?: boolean; } /** * * @param options Open file dialog to select file in browser * @returns */ export declare function openFile(options?: IOptions): Promise<FileList>; export default openFile;