title: Is there a way to turn a cropped image into a file object in JavaScript?
body: <p>I have this line of code</p>
  <pre><code>var cropped_image = canvas.toDataURL();
  </code></pre>
  <p>That is turning the canvas image into a string like .</p>
  <pre><code>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..............
  </code></pre>
  <p>I am wanting this to be a file object.Like when you upload a file as part of</p>
  <pre><code>input type=&quot;file&quot; accept=&quot;image/*&quot; id=&quot;file&quot;   name=&quot;file&quot;
  </code></pre>
  <p>What kind of string is <code>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA</code></p>
  <p>Is there a way to turn that into a file object or a base64 string.</p>