Html Code Create Download Link

Posted on by
  1. See More On Stackoverflow

I have a mobile html page which contains images. I want to create a button or a link which is used for a download of an image. The image should then be saved to the users mobile image gallery.

I have seen this post: The solution Download link is working in desktop browsers but not on mobile. Comand aps ntg2. Here is a JSFiddle I made: Note: The image is created in the browser i.e., in a HTML5 canvas element.

Html Code Create Download Link

See More On Stackoverflow

This image can be generated with canvas.toDataUrl(). The resulting image should be saved to the mobile image gallery. How can save an image to the users mobile image gallery with a click/tap? Is there a JavaScript solution without the ser round trip with a unknown header?