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:
Rob 2018-06-23 10:14:55 -05:00 committed by Daniel Sogl
parent 9f662b6a04
commit dd9ba0ad3f

View File

@ -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