I got this error from firestore when my app take a picture by using camera plugin.
this is my camera.ts
Does anyone know how to solve this problem.
I wish my app can take a picture and post in app Normally.
async takePhoto(){
try {
const options: CameraOptions = {
quality: 50,
// targetHeight: 600,
// targetWidth: 600,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
}
const result = await this.camera.getPicture(options);
const image = `data:image/jpeg;base64,${result}`;
this.postpicture = image;
const pictures = storage().ref(`postImage/`);
pictures.putString(image, 'data_url');
}
catch(e){
console.error(e);
}
}