feat(file-chooser): add missing options param (#3136)

added missing optional parameter to support mime types
This commit is contained in:
Akshay Dwivedi 2019-08-09 17:09:23 +08:00 committed by Daniel Sogl
parent f3b8e34091
commit fd81a5e5b7

View File

@ -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
@ -20,6 +27,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
* .catch(e => console.log(e));
*
* ```
* @interfaces
* FileChooserOptions
*/
@Plugin({
pluginName: 'FileChooser',
@ -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;
}