Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.15 KB

README.md

File metadata and controls

51 lines (32 loc) · 1.15 KB

cordova-plugin-filepath

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. asdasdasdasd

Installation

asdasdasdasd

$ cordova plugin add cordova-plugin-filepath

Supported Platforms

  • Android asdasdasd

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)