title: Javascript Canvas: base64 back to file after resizing&resampling?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4998908/convert-data-uri-to-file-then-append-to-formdata">Convert Data URI to File then append to FormData</a>  </p>
  </blockquote>
  
  
  
  <p>Is it possible to save rendered canvas back to a file in Google Chrome?</p>
  
  <p>I have tried this:</p>
  
  <pre><code>canvas.getAsFile('foo.jpg','image/jpeg')
  </code></pre>
  
  <p>Doesn't work.</p>
  
  <p>This works only in Firefox:</p>
  
  <pre><code>canvas.mozGetAsFile('foo.jpg')
  </code></pre>
  
  <p>Of course I can and probably will just send raw base64 encoded string to server and decode it there.</p>
  
  <p>But if it's possible to do it on client-side, i would prefer doing it there.</p>