Created
March 2, 2015 03:01
-
-
Save perguth/d9eb3ee893dd75c79e7b to your computer and use it in GitHub Desktop.
Open the download dialog for a file blob.
This file contains 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
function saveFile(blob) { | |
var link = document.createElement('a') | |
link.href = window.URL.createObjectURL(blob) | |
link.download = 'File Name' | |
link.click() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment