amazon web services - s3 chunked uploads with blueimp.fileupload -


i'm implementing aws chunked uploads using blueimp plugin, , i've run problem in event ordering.

instead of content-range (presence of causes amazon throw 403), s3 uses upload id , part number query parameters.

so before each chunk, need reach out signing service , change url of next chunk.

it doesn't appear options.chunksend blocks event system options.add, next chunk sent same url first chunk (set in options.add), overwriting it.

how can block send of chunk can change url?

the chunksend event , call upload chunk simultaneous. overrode section of https://github.com/blueimp/jquery-file-upload/blob/master/js/jquery.fileupload.js:

            that._initprogresslistener(o);             jqxhr = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||                     that._getxhrpromise(false, o.context))                 .done(function (result, textstatus, jqxhr) { 

to

            that._initprogresslistener(o);               o.uploadpromise = $.deferred();               that._trigger('chunksend', null, o);               o.uploadpromise.done(function() {                   jqxhr = ((that._trigger('stillneeded', null, o) !== false && $.ajax(o)) ||                           that._getxhrpromise(false, o.context))                       .done(function (result, textstatus, jqxhr) { 

and resolve promise in chunksend event handler.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -