Created
August 7, 2024 14:24
-
-
Save Tonyce/5c7c06aa0eb9e077f4a51bbf1780b87b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var blobUrl = URL.createObjectURL(blob); | |
var link = document.createElement("a"); // Or maybe get it from the current document | |
link.href = blobUrl; | |
link.download = "image.jpg"; | |
// link.innerText = "Click here to download the file"; | |
document.body.appendChild(link); // Or append it whereever you want | |
link.click(); | |
link.remove(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment