feat(chooser): add getFileMetadata (#3425)
This commit is contained in:
parent
1aacb487a4
commit
79c3284434
@ -2,8 +2,8 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface ChooserResult {
|
export interface ChooserResult {
|
||||||
data: Uint8Array;
|
data?: Uint8Array;
|
||||||
dataURI: string;
|
dataURI?: string;
|
||||||
mediaType: string;
|
mediaType: string;
|
||||||
name: string;
|
name: string;
|
||||||
uri: string;
|
uri: string;
|
||||||
@ -64,4 +64,15 @@ export class Chooser extends IonicNativePlugin {
|
|||||||
getFile(accept?: string): Promise<ChooserResult | undefined> {
|
getFile(accept?: string): Promise<ChooserResult | undefined> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Displays native prompt for user to select a file.
|
||||||
|
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
||||||
|
* @returns {Promise<any>} Promise containing selected file's MIME type, display name, and original URI.
|
||||||
|
* If user cancels, promise will be resolved as undefined.
|
||||||
|
* If error occurs, promise will be rejected.
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
getFileMetadata(accept?: string): Promise<ChooserResult | undefined> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user