Skip to content

Instantly share code, notes, and snippets.

log = console.log;
self.onmessage = function(e) {
debugger;
var data = new FormData();
data.append('Filedata', e.data.file.slice(0, 127), encodeURI(e.data.file.name));
console.log(e.data.file.slice(0, 127));
var xhr = new XMLHttpRequest();
log('worker: xhr.open');
xhr.open('POST', location.href, false);
log('worker: xhr.send');