0

I have this line of code

var cropped_image = canvas.toDataURL();

That is turning the canvas image into a string like .

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..............

I am wanting this to be a file object.Like when you upload a file as part of

input type="file" accept="image/*" id="file"   name="file"

What kind of string is data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA

Is there a way to turn that into a file object or a base64 string.

Sato Takeru
  • 1,669
  • 4
  • 12
  • 27

0 Answers0