title: Saving PNG files with FileSaver.js
body: <p>I'm trying to use FileSaver.js to download PNG files that are being served from my express app. The files are being sent as base64 encoded strings, but when I try to use FileSaver.js to save them they become corrupted.</p>
  
  <p>This is the way I'm trying to save them:</p>
  
  <pre><code>var blob = new Blob([base64encodedString], {type: "data:image/png;base64"});
  saveAs(blob, "image.png");
  </code></pre>
  
  <p>I've also used this method of saving the images, but it doesn't work if the base64encodedString becomes too large:</p>
  
  <pre><code>var download = document.createElement('a');
  download.href = 'data:image/png;base64,' + base64encodedString;  
  download.download = 'reddot.png';
  download.click();
  </code></pre>
  
  <p>What am I doing wrong with the FileSaver.js?</p>