Base64 to Gallery plugin not work in Ionic 4 and 5

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 ??

This problem solved with use Photo Library - Ionic Documentation this plugin for image save in gallery.

Thanks, Avirup for the further head-on with this, was facing a similar issue at my end too

Regards,
Roel Hackett

The link helped a lot to get the issue solved.

Regards,
Tutuapp Showbox