I dedicate a considerable amount of my free time to developing and maintaining many cordova plugins for the community (See the list with all my maintained plugins). To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, or if you're asking for new features or priority bug fixes. Thank you!
This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library.
Original inspiration from StackOverflow.
$ cordova plugin add community-cordova-plugin-filepath
- Android
Once installed the plugin defines the window.FilePath
object. To resolve a
file path:
window.FilePath.resolveNativePath('content://...', successCallback, errorCallback);
Returns the file://
file path.
Returns the following object:
{ code: <integer>, message: <string> }
Possible error codes are:
-1
- describes an invalid action0
-file://
path could not be resolved1
- the native path links to a cloud file (e.g: from Google Drive app)
Apache (see LICENSE.md)