From 1d9c449b245d74bae0658b54c1d5ff6de80053e8 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 12 Apr 2018 15:54:00 +0930 Subject: [PATCH] feat(file-picker): add missing options feat(file-picker): add missing options --- .../plugins/file-picker/index.ts | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/@ionic-native/plugins/file-picker/index.ts b/src/@ionic-native/plugins/file-picker/index.ts index 02a8cbd660..476446f65d 100644 --- a/src/@ionic-native/plugins/file-picker/index.ts +++ b/src/@ionic-native/plugins/file-picker/index.ts @@ -1,6 +1,13 @@ import { Injectable } from '@angular/core'; import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; +export interface IOSFilePickerPosition { + x: number; + y: number; + width: number; + height: number; +}; + /** * @name iOS File Picker * @description @@ -20,6 +27,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; * .catch(err => console.log('Error', err)); * * ``` + * @interfaces + * IOSFilePickerPosition */ @Plugin({ pluginName: 'iOS File Picker', @@ -32,10 +41,17 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; export class IOSFilePicker extends IonicNativePlugin { /** * Open a file + * @params {string | string[]} [utis] + * @params {IOSFilePickerPosition} [position] Set the position of the rectangle where the file picker should show up. * @returns {Promise} */ - @Cordova() - pickFile(): Promise { + @Cordova({ + callbackOrder: 'reverse' + }) + pickFile( + utis?: string | string[], + position?: IOSFilePickerPosition + ): Promise { return; } }