in-tree extjs-upload-widget

This commit is contained in:
gitadmin committed 2018-08-15 11:12:01 +03:00
1 parent 025b5f745e
commit 4635ee3492
46 files changed
+3166

No files matched your search

@@ -0,0 +1,32 @@
/**
* Modified Ext.data.Connection object, adapted to be able to report progress.
*/
Ext.define('Ext.ux.upload.data.Connection', {
extend : 'Ext.data.Connection',
/**
* @cfg {Function}
*
* Callback fired when a progress event occurs (xhr.upload.onprogress).
*/
progressCallback : null,
request : function(options) {
var progressCallback = options.progress;
if (progressCallback) {
this.progressCallback = progressCallback;
}
this.callParent(arguments);
},
getXhrInstance : function() {
var xhr = this.callParent(arguments);
if (this.progressCallback) {
xhr.upload.onprogress = this.progressCallback;
}
return xhr;
}
});