Requires Cordova >= 2.8.0
$ cordova plugin add http://github.com/ihadeed/cordova-filechooser.git
$ plugman --platform android --project /path/to/project \
--plugin http://github.com/ihadeed/cordova-filechooser.git
fileChooser.open(filter, successCallback, failureCallback); // with mime filter
fileChooser.open(successCallback. failureCallback); // without mime filter
{ "mime": "application/pdf" } // text/plain, image/png, image/jpeg, audio/wav etc
The success callback gets the uri of the selected file
fileChooser.open(function(uri) {
alert(uri);
});
- Android
- Windows (UWP)
TODO rename open
to pick, select, or choose.