I am currently uploading images pasted from the clipboard with the following code:
// Turns out getAsFile will return a blob, not a file var blob = event.cli
For Chrome, Safari and Firefox, just use this:
form.append("blob", blob, filename);
(see MDN documentation)