Skip to content

Commit

Permalink
feat(file-chooser): add missing options param (#3136)
Browse files Browse the repository at this point in the history
added missing optional parameter to support mime types
  • Loading branch information
akshaydwivedi29 authored and danielsogl committed Aug 9, 2019
1 parent f3b8e34 commit fd81a5e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/@ionic-native/plugins/file-chooser/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 FileChooserOptions {
/**
* comma seperated mime types to filter files.
*/
mime: string;
}

/**
* @name File Chooser
* @description
Expand All @@ -20,6 +27,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
* .catch(e => console.log(e));
*
* ```
* @interfaces
* FileChooserOptions
*/
@Plugin({
pluginName: 'FileChooser',
Expand All @@ -33,10 +42,11 @@ export class FileChooser extends IonicNativePlugin {

/**
* Open a file
* @param {FileChooserOptions} [options] Optional parameter, defaults to ''. Filters the file selection list according to mime types
* @returns {Promise<string>}
*/
@Cordova()
open(): Promise<string> {
open(options?: FileChooserOptions): Promise<string> {
return;
}

Expand Down

0 comments on commit fd81a5e

Please sign in to comment.