mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 01:19:36 +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 { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
export interface FileChooserOptions {
|
||||||
|
/**
|
||||||
|
* comma seperated mime types to filter files.
|
||||||
|
*/
|
||||||
|
mime: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name File Chooser
|
* @name File Chooser
|
||||||
* @description
|
* @description
|
||||||
@ -20,6 +27,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
|||||||
* .catch(e => console.log(e));
|
* .catch(e => console.log(e));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
|
* @interfaces
|
||||||
|
* FileChooserOptions
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'FileChooser',
|
pluginName: 'FileChooser',
|
||||||
@ -33,10 +42,11 @@ export class FileChooser extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a file
|
* Open a file
|
||||||
|
* @param {FileChooserOptions} [options] Optional parameter, defaults to ''. Filters the file selection list according to mime types
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
open(): Promise<string> {
|
open(options?: FileChooserOptions): Promise<string> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user