Browse Source

No Content-Range, then finish with current data!

pull/335/head
Hanwiz 9 years ago committed by GitHub
parent
commit
341b98fe4e
  1. 3
      papaparse.js

3
papaparse.js

@ -594,6 +594,9 @@
function getFileSize(xhr) function getFileSize(xhr)
{ {
var contentRange = xhr.getResponseHeader('Content-Range'); var contentRange = xhr.getResponseHeader('Content-Range');
if (contentRange === null) { // no content range, then finish!
return -1;
}
return parseInt(contentRange.substr(contentRange.lastIndexOf('/') + 1)); return parseInt(contentRange.substr(contentRange.lastIndexOf('/') + 1));
} }
} }

Loading…
Cancel
Save