updated receiving end

This commit is contained in:
Abhinav Adduri 2017-06-02 12:38:05 -07:00
parent 28498af6d5
commit a45d3dca73
6 changed files with 243 additions and 151 deletions

View file

@ -75,7 +75,6 @@ class FileSender extends EventEmitter {
fd.append('data', blob, file.name);
let xhr = new XMLHttpRequest();
xhr.open('post', '/upload/' + fileId, true);
xhr.upload.addEventListener('progress', e => {
if (e.lengthComputable) {
@ -93,7 +92,8 @@ class FileSender extends EventEmitter {
});
}
};
xhr.open('post', '/upload/' + fileId, true);
xhr.send(fd);
});
});