Resumable upload #57

Merged
merged 13 commits into from Feb 7, 2013

Conversation

Projects
None yet
2 participants

Implementation of a chunked file upload.

@RubaXa RubaXa and 1 other commented on an outdated diff Jan 26, 2013

lib/FileAPI.XHR.js
- xhr.upload.addEventListener('progress', api.throttle(function (/**Event*/evt){
- options.progress(evt, _this, options);
- }, 100), false);
- }
-
- xhr.onreadystatechange = function (){
- _this.status = xhr.status;
- _this.statusText = xhr.statusText;
- _this.readyState = xhr.readyState;
+
+ if (options.resumable && api.support.resumable) {
+ // resumable upload
+ if( xhr.upload ){
+ // https://github.com/blueimp/jQuery-File-Upload/wiki/Fixing-Safari-hanging-on-very-high-speed-connections-%281Gbps%29
+ xhr.upload.addEventListener('progress', api.throttle(function (/**Event*/evt){
+ var e = jQuery.extend({}, evt, {
@RubaXa

RubaXa Jan 26, 2013

Contributor

Нужно заменить jQuery.extend на api.extend.

RubaXa merged commit cc4c963 into mailru:master Feb 7, 2013

@RubaXa RubaXa added a commit that referenced this pull request Feb 8, 2013

@RubaXa RubaXa + v1.2.0: (#57) Chunked upload documentation 0bab550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment