File Chooser
Opens the file picker on Android for the user to select a file, returns a file URI.
Repo: https://github.com/ihadeed/cordova-filechooser
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-filechooser $ npm install --save @ionic-native/file-chooser@4
- Add this plugin to your app's module
Supported platforms
- Android
Usage
import { FileChooser } from '@ionic-native/file-chooser';
constructor(private fileChooser: FileChooser) { }
...
this.fileChooser.open()
.then(uri => console.log(uri))
.catch(e => console.log(e));
Instance Members
open()
Open a file
Returns: Promise<string>