Add a link to this Scripts collection of ToolkitScriptManager control or simply place it at the very bottom of the page:
var legacyAddToQueue = Sys.Extended.UI.AjaxFileUpload.prototype._addToQueue; Sys.Extended.UI.AjaxFileUpload.prototype._addToQueue = function(element){ legacyAddToQueue.apply(this, [element]); this._doUpload(); }
Works well from the console on this page: AjaxFileUpload Demo
In addition, in my opinion, it is better to configure ACT sources and add a new property of type UploadAutomatically to this element. Let me know if you prefer this option and you need more information about how to contact such employees.
UPDATED: try this script for the new AjaxFileUpload (should work for new and old versions, but not yet verified)
if (Sys.Extended.UI.AjaxFileUpload.prototype._addToQueue) { var legacyAddToQueue = Sys.Extended.UI.AjaxFileUpload.prototype._addToQueue; Sys.Extended.UI.AjaxFileUpload.prototype._addToQueue = function (element) { legacyAddToQueue.apply(this, [element]); this._doUpload(); }; }else if(Sys.Extended.UI.AjaxFileUpload.Control){ var legacyaddFileToQueue = Sys.Extended.UI.AjaxFileUpload.Control.prototype.addFileToQueue; Sys.Extended.UI.AjaxFileUpload.Control.prototype.addFileToQueue = function(fileItem){ if(legacyaddFileToQueue.apply(this, [fileItem])){ this._isUploading = true; this.enableControls(this._isUploading); this._processor.startUpload(); } }; }
source share