Resolve native file paths from content URLs for Cordova platforms
Java JavaScript
Switch branches/tags
Nothing to show
Clone or download
Latest commit e7ce911 Jul 24, 2018


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 cordova-plugin-filepath

Supported Platforms

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


Apache (see