The 2017 Ionic Developer Survey Results are in!

File Chooser

Improve this doc

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

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-filechooser
    $ npm install --save @ionic-native/file-chooser
    
  2. Add this plugin to your app's module

Supported platforms

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>

API

Native

General