New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wisdomgarden/cordova-plugin-filepath

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wisdomgarden/cordova-plugin-filepath

Resolve native file paths from content URLs for Cordova platforms

1.6.0-8
latest
Source
npm
Version published
Maintainers
0
Created
Source

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 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)

NOTES

Support get native path from third party apps such as WhatsApp

About Android 11:

Keywords

cordova

FAQs

Package last updated on 14 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts