I have an HTML5 canvas element. I need to send a canvas image to my server. It works fine in all the PC browsers I tried, but iOS Safari crashes with an Out of Memory error in the log files. The canvas image is almost 500 KB, because it is 950x323 PNG. Here is a simplified version of my submit code:
$('#imageJSON').val(JSON.stringify(myCanvas));
var d = myCanvas.toDataURL();
$('#imageData').val(d);
$('#myForm').submit();
Safari starts serving, but resets a few seconds to submit. The server receives other data with the request, but imageData is not complete. I tried changing the form's enctype form to "multipart / form-data", but that didn't help.
source
share