How To Save Image Path In Sqlite Cordova
I want show the image taken from camera or chosen from gallery , after saving the image in filesystem then pushing the file image url into sqlite database successfully , I can't fi
Solution 1:
you can preview your image by setting destinationType to Camera.DestinationType.DATA_URL
var options = {
quality: 75,
destinationType: Camera.DestinationType.DATA_URL,
sourceType: sourceType,
allowEdit: true,
encodingType: Camera.EncodingType.JPEG,
correctOrientation: true,
targetWidth: 800,
targetHeight: 800,
popoverOptions: CameraPopoverOptions, // for IOS and IPAD
saveToPhotoAlbum: false
};
and in callback, use
"data:image/jpeg;base64," +imageData;
like this
$cordovaCamera.getPicture(options).then(function(imagePath) {
var currentImage = "data:image/jpeg;base64," +imagePath;
});
Post a Comment for "How To Save Image Path In Sqlite Cordova"