Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    The a.click() does not seem to work in firefox... Any idea? Commented Nov 14, 2017 at 18:34
  • In some browsers you might need to add the a to the dom in order for this code to work and/or remove the revokeObjectURL part: document.body.appendChild(a) Commented Nov 14, 2017 at 21:26
  • saved my day (and possibly a job too :) ) Not a javascript expert by any measure... more java guy. However, I have no idea why a simple "createObjectURL(new Blob([atob(base64)]))" doesn't work! It simply doesn't, while all instinct says it must. grrr... Commented Mar 21, 2019 at 19:55
  • at line var bytechars = atob(base64) it throws an error JavaScript runtime error: InvalidCharacterError. I am using Chrome Version 75.0.3770.142 but i dont know, what is wrong here. Commented Aug 7, 2019 at 9:23