javascript - Safari: After 6 concurrent XMLHttpRequest requests, progress block won't get called -
i building multiple file upload jquery
script, , using xmlhttprequest
, formdata
upload files. works great.
but, testing , have read, can have 6 concurrent xmlhttprequest
requests @ same time. testing correct, after of 6 complete, next ones in queue upload, 1 expect.
the issue arises progress function. function getting called first 6 files when using safari, next files queued not call progress method. firefox , chrome perform correctly , show progress files. here using:
_makerequest: function(asset) { var _this = this; var xhr = new xmlhttprequest(); (function(progress) { xhr.upload.onprogress = function(e) { if (e.lengthcomputable) { _this._progress(asset, e); } else { _this._log('error: 'asset.file.name+' not computable'); } }; }(asset.progress)); xhr.upload.addeventlistener('load', function(e) { _this._complete(e, _this); }); xhr.upload.addeventlistener('error', function(e) { _this._failed(e, _this); }); xhr.upload.addeventlistener("abort", function(e) { _this._canceled(e, _this); }); xhr.upload.addeventlistener("loadstart", function(e) { _this._start(e, _this); }); xhr.open("post", this.assetbuilder.url); xhr.send(this._formdata(asset)); }
is there way queued files call progress function in safari can update ui progress bar?
Comments
Post a Comment