feat(file-chooser): add file chooser plugin support (#495)

This commit is contained in:
Ibrahim Hadeed
2016-08-27 14:35:12 -04:00
committed by GitHub
parent 4e9bc95fff
commit 94a7dae863
2 changed files with 33 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import {Plugin, Cordova} from './plugin';
/**
* @name FileChooser
* @description
*
* Opens the file picker on Android for the user to select a file, returns a file URI.
*
* @usage
* ```
* import {FileChooser} from 'ionic-native';
*
* FileChooser.open()
* .then(uri => console.log(uri);
* .catch(e => console.log(e);
*
* ```
*/
@Plugin({
plugin: 'http://github.com/don/cordova-filechooser.git',
pluginRef: 'fileChooser',
repo: 'https://github.com/don/cordova-filechooser',
platforms: ['Android']
})
export class FileChooser {
/**
* Open a file
*/
@Cordova()
static open(): Promise<string> {return; }
}