title: How to add base64 data to FormData so that it's uploaded as binary
body: <p>I have a API source of image data in base64 format. I'm trying to upload it as normal binary upload.</p>
  
  <p>From <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects" rel="nofollow">MDN</a> I can see that my problem is, given the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob" rel="nofollow">Blob</a> is available, reduced to making binary Blob from base64:</p>
  
  <pre><code>var content = 'iVBORw0KGgoAAAANSUhEUgAABUUAAAI/...'; // the image
  var blob = new Blob([content], { type: "image/png,base64"});
  
  formData.append("image", blob);
  </code></pre>
  
  <p>How can I do this safely (=avoid wild unicode strings)?</p>