I'm uploading a canvas image to my server by AJAX using a method like this:
myCanvas.toBlob( function( blob ) {
var fdata = new FormData( );
fdata.append( 'myFile', blob );
$.ajax( {
url: 'http://myScript.foo',
type: 'POST',
data: fdata,
processData: false,
contentType: false
} );
}, 'image/jpeg', 0.9 );
(with thanks to https://stackoverflow.com/a/8244082/1180785)
But according to Mozilla,
toBlob
[…] Returns aBlob
object representing the image contained in the canvas; this file may be cached on the disk or stored in memory at the discretion of the user agent
(https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement)
It's quite important for my program that the image is not kept (not as a restriction, but as a privacy concern). So I need to know if there is a guarantee that this possible cached copy will be deleted, and when. There's also a potential risk of undelete programs finding it, so I'd like to know if I can overwrite the data or force a secure deletion in some other way.
If it's possible to achieve the same result without risking a locally-cached copy, it would be even better. Encryption is also an option if that's possible.
I only care about modern browsers, supporting getUserMedia
specifically, so no IE (I have a Flash fallback for older browsers which processes everything in memory).