cordova-plugin-photo-library
cordova-plugin-photo-library copied to clipboard
saveImage() method not working when the image has params in the URL
This function is not working then images have parameters in the URL like image.jpg?token=1234 which is actually the default format of Firebase images.
Not sure if this is bug, but just wanted to check in case there is a workaround for it.
Have you tried adding a parameter like: "&ext=.jpg"
Thank you @wimluiten, that works! This is my function in case somebody else has this same problem.
// Add .jpg param to force download
this.photoLibrary.saveImage(this.image + '&ext=.jpg', this.albumName).then((entry=>{
console.log('download complete: ' + entry.photoURL);
this.presentToast('download complete:' + entry.photoURL);
}),
(error) => {
// handle error
throw new Error(error);
});
Good to hear, i couldn't even get the plugin to install ;)
I think this plugin is very useful for a lot of cordova (ionic) apps. We should keep it alive, but unfortunately i don't have a lot of time on my hands right now.
You're right, this is a very helpful plugin it would be awesome if somebody can pick it up.