<commit_before># tus-jquery-client

A jQuery client implementing the [tus resumable upload
protocol](https://github.com/tus/tus-resumable-upload-protocol).

This first version will provide a low level API without a GUI. More advanced
features will follow.

## Example

The code below outlines how the API could work.

```js
$('input[type=file]').change(function() {
  var options = {url: 'http://localhost:1080/files'};
  tus
    .upload(this.files[0], options)
    .fail(function(upload, error) {
      console.log('upload failed', error);
    })
    .progress(function(upload) {
      console.log(upload.bytesSent, upload.bytesTotal);
    })
    .done(function(upload) {
      console.log(upload.url);
    });
});
```

## Try the demo<commit_msg>fix example code<commit_after># tus-jquery-client

A jQuery client implementing the [tus resumable upload
protocol](https://github.com/tus/tus-resumable-upload-protocol).

This first version will provide a low level API without a GUI. More advanced
features will follow.

## Example

The code below outlines how the API could work.

```js
$('input[type=file]').change(function() {
  var options = { endpoint: 'http://localhost:1080/files' };
  var input   = $(this);

  tus
    .upload(this.files[0], options)
    .fail(function(error) {
      console.log('upload failed', error);
    })
    .always(function() {
       input.val('');
    })
    .progress(function(e, bytesUploaded, bytesTotal) {
       console.log(bytesUploaded, bytesTotal);
    })
    .done(function(url, file) {
      console.log(url);
      console.log(file.name);
    });
});
```

## Try the demo
{'fraction_non_alphanumeric': 0.14965986394557823, 'fraction_numerical': 0.006184291898577613, 'mean_word_length': 3.544943820224719, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6281833', 'n_tokens_mistral': 521, 'n_tokens_neox': 505, 'n_words': 129}