To do this, you will have to modify the file-uploader.js file. On line 309, change the onChange function to return false. Then add the following function above it so that the code becomes:
startUpload: function(){
this._onInputChange(this._button.getInput());
},
_createUploadButton: function(element){
var self = this;
return new qq.UploadButton({
element: element,
multiple: this._options.multiple && qq.UploadHandlerXhr.isSupported(),
onChange: function(input){
return false;
}
});
},
Then, in your HTML file, by clicking a button or any other event, call
uploader.startUpload();
where uploader is the name of your qq.FileUploader () object.
Hope that helps :)
source
share