Created
November 15, 2016 16:13
-
-
Save cachius/6888dc1e0e42159b098f0d857fe94d25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
xhr.send(data); | |
log('worker: xhr.send.finished'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment