mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
feat(file-chooser): add missing options param (#3136)
added missing optional parameter to support mime types
This commit is contained in:
parent
f3b8e34091
commit
fd81a5e5b7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user