5

Possible Duplicate:
Convert Data URI to File then append to FormData

Is it possible to save rendered canvas back to a file in Google Chrome?

I have tried this:

canvas.getAsFile('foo.jpg','image/jpeg')

Doesn't work.

This works only in Firefox:

canvas.mozGetAsFile('foo.jpg')

Of course I can and probably will just send raw base64 encoded string to server and decode it there.

But if it's possible to do it on client-side, i would prefer doing it there.

Community
  • 1
  • 1
Somebody
  • 9,316
  • 26
  • 94
  • 142

1 Answers1

1

Maybe this Stack Overflow Question and Answer might help you.

Community
  • 1
  • 1
Sani Huttunen
  • 23,620
  • 6
  • 72
  • 79