From ca844db4ec27840502ca284b9e647d4125aad0ff Mon Sep 17 00:00:00 2001 From: Robert Abeyta Date: Mon, 18 May 2015 13:28:07 -0700 Subject: [PATCH] updated getPictures to validate the outputType and default it to FILE_URI when not passed in. --- www/imagepicker.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/www/imagepicker.js b/www/imagepicker.js index 4a0e684..cd33e03 100644 --- a/www/imagepicker.js +++ b/www/imagepicker.js @@ -35,19 +35,24 @@ ImagePicker.prototype.validateOutputType = function(options){ * image will be returned) * .height - height to resize image to * .quality - quality of resized image, defaults to 100 +* .outputType - type of output returned. defaults to file URIs. +* Please see ImagePicker.OutputType for available values. */ ImagePicker.prototype.getPictures = function(success, fail, options) { if (!options) { options = {}; } + + this.validateOutputType(options); var params = { maximumImagesCount: options.maximumImagesCount ? options.maximumImagesCount : 15, width: options.width ? options.width : 0, height: options.height ? options.height : 0, - quality: options.quality ? options.quality : 100 + quality: options.quality ? options.quality : 100, + outputType: options.outputType ? options.outputType : this.OutputType.FILE_URI }; - + return cordova.exec(success, fail, "ImagePicker", "getPictures", [params]); };