Let user to specify local files from his computer
Flmngr.selectFiles
Opens a standard dialog of a browser where the user can specify a file or files from their computer for further use by your application.
This method does not open the standard File Manager dialog; instead, it opens just a simple file select dialog of a browser. Please note that this method should not be confused with the Flmngr.open({params}) method.
Then you can pass these files to the Flmngr.upload({params}) method to upload them to your server storage.
Code samples:
Parameters
-
Specify whether one or more files will be allowed to be selected.
Optional Default is
false -
acceptExtensions:string[]A list of file extensions that are allowed to be selected.
For example, you can pass
[".doc", ".docx"]if you only want to allow the selection of Microsoft Word documents. You can also specify allowed image extensions here.Note: Some legacy versions of browsers (especially their Linux versions) may ignore this parameter. So please double-check the file types selected by the user once you have received them.
Optional Default is
null(all file extensions are allowed). -
onFinish:(files: File[])This callback will be called after the user successfully selectes some files or images. The
filesargument will contain an array of standardFileentities of a browser.Please note that there is no
onCancelcallback available since browsers do not support it.