Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48983

Base64 to Gallery plugin not work in Ionic 4 and 5

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 48983

Trending Articles