29 lines
593 B
Markdown
29 lines
593 B
Markdown
|
Cordova FileChooser Plugin
|
||
|
|
||
|
Requires Cordova >= 2.8.0
|
||
|
|
||
|
Install with Cordova CLI
|
||
|
|
||
|
$ cordova plugin add http://github.com/don/cordova-filechooser.git
|
||
|
|
||
|
Install with Plugman
|
||
|
|
||
|
$ plugman --platform android --project /path/to/project \
|
||
|
--plugin http://github.com/don/cordova-filechooser.git
|
||
|
|
||
|
API
|
||
|
|
||
|
fileChooser.open(successCallback, failureCallback);
|
||
|
|
||
|
The success callback get the uri of the selected file
|
||
|
|
||
|
fileChooser.open(function(uri) {
|
||
|
alert(uri);
|
||
|
});
|
||
|
|
||
|
Screenshot
|
||
|
|
||
|
![Screenshot](filechooser.png "Screenshot")
|
||
|
|
||
|
TODO rename `open` to pick, select, or choose.
|