Reputation: 301
I am currently using the cordova camera getPicture and it doesn't seem to be retrieving the file extension/type even though I have stated the encoding type.
navigator.camera.getPicture(onSuccess, onError,
{ quality : 50,
destinationType : navigator.camera.DestinationType.FILE_URI,
sourceType : navigator.camera.PictureSourceType.PHOTOLIBRARY,
encodingType : 0,
mediaType : 0
});
function onSuccess(imageURI)
{
$scope.uploadAttachment(imageURI);
}
function onError(message)
{
alert("fail");
alert('Failed because: ' + message);
}
Upvotes: 0
Views: 392
Reputation: 7523
You have already specified the type of returning image file
eg.encodingType : 0
0 is for JPEG & 1 is for PNG
Upvotes: 1