iOS DocumentPicker

Improve this doc

Opens the file picker on iOS for the user to select a file, returns a file URI. Allows the user to upload files from iCloud

Repo: https://github.com/iampossible/Cordova-DocPicker

Installation

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

Supported platforms

Usage

import { IOSDocumentPicker } from '@ionic-native/document-picker';

constructor(private docPicker: IOSDocumentPicker) { }

...

this.docPicker.getFile('all')
  .then(uri => console.log(uri))
  .catch(e => console.log(e));

Instance Members

getFile(option)

Open a file

Param Type Details
option string

files between 'image', 'pdf' or 'all'Optional

Returns: Promise<string>

API

Native

General