1.6.1 • Published 9 months ago
@iamryann/cordova-plugin-filepath v1.6.1
Repository Notice
This repository is a forked version of hiddentao/cordova-plugin-filepath to support the latest Android permissions, including:
android.permission.READ_MEDIA_IMAGES
android.permission.READ_MEDIA_VIDEO
android.permission.READ_MEDIA_AUDIO
Installation
$ cordova plugin add @drimz/cordova-plugin-filepath
cordova-plugin-filepath
PLEASE NOTE: This plugin is no longer actively maintained.
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.
Installation
$ cordova plugin add cordova-plugin-filepath
Supported Platforms
- Android
Usage
Once installed the plugin defines the window.FilePath
object. To resolve a
file path:
window.FilePath.resolveNativePath('content://...', successCallback, errorCallback);
successCallback
Returns the file://
file path.
errorCallback
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)
LICENSE
Apache (see LICENSE.md)
1.6.1
9 months ago