File Path
This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library.
Repo: https://github.com/hiddentao/cordova-plugin-filepath
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-filepath $ npm install --save @ionic-native/file-path@4
- Add this plugin to your app's module
Supported platforms
- Android
Usage
import { FilePath } from '@ionic-native/file-path';
constructor(private filePath: FilePath) { }
...
this.filePath.resolveNativePath(path)
.then(filePath => console.log(filePath))
.catch(err => console.log(err));
Instance Members
resolveNativePath(path)
Resolve native path for given content URL/path.
Param | Type | Details |
---|---|---|
path |
string
|
Content URL/path. |
Returns: Promise<string>