node-XMLHttpRequest
node-XMLHttpRequest copied to clipboard
Add Progress / Upload Event
Bump of https://github.com/driverdan/node-XMLHttpRequest/issues/37
I can submit a PR if it can be merged.
If you are looking for maintainers for this project I'd be more than welcome to help.
$('#file').on('change', function (event) {
var xhr = new XMLHttpRequest();
xhr.upload.addEventListener('progress', onProgress, false);
xhr.addEventListener('load', onSuccess, false);
xhr.open('POST', '/upload/audio');
fd = new FormData();
fd.append('file', event.target.files[0]);
xhr.send(fd);
});