I am using a cordova plugin to capture user’s profile picture. I want to store this in the app.
Here is the code that captures it:
Camera.getPicture({
quality : 75,
destinationType : Camera.DestinationType.DATA_URL,
sourceType : Camera.PictureSourceType.CAMERA,
allowEdit : true,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 300,
targetHeight: 300,
saveToPhotoAlbum: false
}).then(imageData => {
this.base64Image = "data:image/jpeg;base64," + imageData;
}, error => {
console.log("ERROR -> " + JSON.stringify(error));
});
Once the image is captured, I want to store it locally so that I can display it on the profile page. Any clue how I can do this ?