You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found that when listening to a file's changeProgress event, the file's state never becomes the final state of uploaded'. So something like the following will never execute the the code when the state is uploaded.
letuploader=newcom.zenesis.qx.upload.UploadMgr(this.upload,uploadUrl);uploader.addListener('addFile',function(evt){letfile=evt.getData();letprogressListenerId=file.addListener('changeProgress',function(evt){letfile=evt.getTarget();letuploadedSize=evt.getData();if(file.getState()==='uploading'){console.log('uploading...');}elseif(file.getState()==='uploaded'){// this is never executed...console.log('finished uploading!');}}});
I have made a fix by firing the changeProgress data event in File.js _applyState function:
// property apply
_applyState: function(value,oldValue){qx.core.Assert.assertTrue((!oldValue&&value=="not-started")||(oldValue=="not-started"&&(value=="cancelled"||value=="uploading"))||(oldValue=="uploading"&&(value=="cancelled"||value=="uploaded")));// fire the event!this.fireDataEvent('changeProgress',value);}
The text was updated successfully, but these errors were encountered:
I have found that when listening to a file's
changeProgress
event, the file'sstate
never becomes the final state ofuploaded'
. So something like the following will never execute the the code when the state isuploaded
.I have made a fix by firing the
changeProgress
data event in File.js_applyState
function:The text was updated successfully, but these errors were encountered: