Skip to content

Commit

Permalink
feat(file-picker): add missing options
Browse files Browse the repository at this point in the history
feat(file-picker): add missing options
  • Loading branch information
markv authored and danielsogl committed Apr 12, 2018
1 parent a3c4621 commit 1d9c449
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/@ionic-native/plugins/file-picker/index.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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',
Expand All @@ -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<string>}
*/
@Cordova()
pickFile(): Promise<string> {
@Cordova({
callbackOrder: 'reverse'
})
pickFile(
utis?: string | string[],
position?: IOSFilePickerPosition
): Promise<string> {
return;
}
}

0 comments on commit 1d9c449

Please sign in to comment.