UNPKG

1.68 kBJavaScriptView Raw
1"use strict";
2var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6 return c > 3 && r && Object.defineProperty(target, key, r), r;
7};
8var plugin_1 = require('./plugin');
9/**
10 * @name FileChooser
11 * @description
12 *
13 * Opens the file picker on Android for the user to select a file, returns a file URI.
14 *
15 * @usage
16 * ```
17 * import {FileChooser} from 'ionic-native';
18 *
19 * FileChooser.open()
20 * .then(uri => console.log(uri))
21 * .catch(e => console.log(e));
22 *
23 * ```
24 */
25var FileChooser = (function () {
26 function FileChooser() {
27 }
28 /**
29 * Open a file
30 * @returns {Promise<string>}
31 */
32 FileChooser.open = function () { return; };
33 __decorate([
34 plugin_1.Cordova()
35 ], FileChooser, "open", null);
36 FileChooser = __decorate([
37 plugin_1.Plugin({
38 pluginName: 'FileChooser',
39 plugin: 'http://github.com/don/cordova-filechooser.git',
40 pluginRef: 'fileChooser',
41 repo: 'https://github.com/don/cordova-filechooser',
42 platforms: ['Android']
43 })
44 ], FileChooser);
45 return FileChooser;
46}());
47exports.FileChooser = FileChooser;
48//# sourceMappingURL=file-chooser.js.map
\No newline at end of file