cordova-plugin-filepath-alwaysmkt

1.5.8 • Public • Published

cordova-plugin-filepath-alwaysmkt

PLEASE NOTE: This plugin is created for sake of supporting on Android 11 scoped storage changes.

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

$ ionic cordova plugin add cordova-plugin-filepath-alwaysmkt

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 action
  • 0 - file:// path could not be resolved
  • 1 - the native path links to a cloud file (e.g: from Google Drive app)

LICENSE

Apache (see LICENSE.md)

Package Sidebar

Install

npm i cordova-plugin-filepath-alwaysmkt

Weekly Downloads

1

Version

1.5.8

License

Apache 2.0

Unpacked Size

42.7 kB

Total Files

7

Last publish

Collaborators

  • zyhzx123e_jason