data uploading by ajax in iOS webview
<p>In iOS webview I have implemented file uploading:</p>

<pre><code>function upload(blobOrFile) {
  var xhr = new XMLHttpRequest();
  xhr.open('POST', '/server', true);
  xhr.onload = function(e) { ... };
  xhr.send(blobOrFile);
}

document.querySelector('input[type="file"]').addEventListener('change', function(e) {
  var blob = this.files[0];

  const BYTES_PER_CHUNK = 1024 * 1024; // 1MB chunk sizes.
  const SIZE = blob.size;

  var start = 0;
  var end = BYTES_PER_CHUNK;

  while(start &lt; SIZE) {
    upload(blob.slice(start, end));

    start = end;
    end = start + BYTES_PER_CHUNK;
  }
}, false);

})();
</code></pre>

<p>This JavaScript work well in all browser, but in iOS webview it send empty POST ? 
Before send I tried to alert() blob length was correct, but in server side I get 0 content length. What can cause this problem and is possible to fix  this from JS side ? </p>