Reputation: 181
I am using Phonegap and the camera application. I want to obtain a base64 encoded string. but can't get it to work. I am always getting a system path of the image. I need to retrieve the string.
function clickPhoto()
{
navigator.camera.getPicture(onPhotoDataSuccess, onFail,
{
quality: 25,
destinationType: destinationType.FILE_URI
});
}
I need to know how to get the base64 encoded string. I read somewhere on stack that the default of phonegap now returns file path. I need a base64.
Please suggest.
Upvotes: 0
Views: 88
Reputation: 13415
Use this :
navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50,
destinationType: destinationType.DATA_URL });
Thanks.
Upvotes: 1