Plugin is :: Base64 To Gallery - Ionic Documentation
When I saved a image into gallery then show this error “Error while saving image”
Code ::
downloadQR(){
const canvas = document.querySelector(‘canvas’) as HTMLCanvasElement;
const imageData = canvas.toDataURL(‘image/jpeg’).toString()
console.log(imageData)
let data = imageData.split(’,’)[1];
console.log(data)
this.base64.base64ToGallery(data, {
prefix:’_img’,mediaScanner : true}).then(async res=>{
console.log(res)
let toast = await this.toastCtrl.create({
header : ‘QR code save’
})
toast.present()
}, err => console.log(“err”,err)
)
}
What is problem of my code? any other solution ??
1 post - 1 participant