node-XMLHttpRequest icon indicating copy to clipboard operation
node-XMLHttpRequest copied to clipboard

Add Progress / Upload Event

Open dplewis opened this issue 7 years ago • 0 comments

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);
});

dplewis avatar Nov 30 '18 22:11 dplewis