dimanche 25 octobre 2020

copying image served through signedUrl?

I am using Firebase functions to generate a signedUrl of a image with expiration time of being 5 mins.

The image is served properly but now i want to provide my website user a function to copy that image to clipboard and paste it software like microsoft word paint or whatever.

With little tries that i've made i found out that methods based on blob or fetch to base64 won't work as Firebase storage or storage bucked won't allow cross origin.

There is no other way i found that can directly extract the image data from loaded image in img tags source.

Can we just use the browser's context menu to call the copy button to copy the image ?

I know this may sound weird and Its kinda hijacking but i can't think of other ways to do so.




Aucun commentaire:

Enregistrer un commentaire