mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
feat(image-picker): add DATA_URL as an option to ImagePicker (#2325)
As documented in the image picker plugin, it also supports a data url, just like the camera does. However, this option is not documented in Ionic Native currently. I've added this documentation, and have also added an enum with a naming pattern that matches the DestinationType in Camera. Docs from the image picker plugin: ``` ... // output type, defaults to FILE_URIs. // available options are // window.imagePicker.OutputType.FILE_URI (0) or // window.imagePicker.OutputType.BASE64_STRING (1) outputType: int }; ```
This commit is contained in:
parent
9f662b6a04
commit
dd9ba0ad3f
@ -23,11 +23,19 @@ export interface ImagePickerOptions {
|
||||
quality?: number;
|
||||
|
||||
/**
|
||||
* Output type, defaults to 0 (FILE_URI).
|
||||
* Choose the format of the return value.
|
||||
* Defined in ImagePicker.OutputType. Default is FILE_URI.
|
||||
* FILE_URI : 0, Return image file URI,
|
||||
* DATA_URL : 1, Return image as base64-encoded string
|
||||
*/
|
||||
outputType?: number;
|
||||
}
|
||||
|
||||
export enum OutputType {
|
||||
FILE_URL = 0,
|
||||
DATA_URL
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Image Picker
|
||||
* @description
|
||||
|
Loading…
Reference in New Issue
Block a user