I am using the plugin camera in my application Ionic 1.2.0. What I do with the pictures he took with the camera I go to my server. I also wanted to select an image from the library.
I'm having problems with retrieving an image of the gallery on the device. I get the URL for me it is not valid, I can not raise.
This code use to rescue the image :
$scope.getPicture = function(){
var options = {
quality: 75,
destinationType: Camera.DestinationType.FILE_URI,
sourceType : Camera.PictureSourceType.PHOTOLIBRARY,
encodingType: Camera.EncodingType.JPEG,
popoverOptions: CameraPopoverOptions,
correctOrientation: true,
targetWidth: 720
};
Camera.getPicture(options).then(function(imageURI) {
console.log(imageURI);
$scope.photo = imageURI;
$scope.nueva_foto = imageURI;
$scope.mostrar_form = true;
}, function(err) {
console.log("error al seleccionar imagen "+err);
});
};
The URL of the image I get is: image%3A43