Hi There!
I have a metabox file upload field which has a problem that if you submit the form while the files are being uploaded, it does not wait for the file upload to be finished, and we end up saving the post without files getting saved.
What I have figured is that if we disable the submit button while the files are being uploaded, then this situation can be taken care of. Until now, I have figured that plupload library is being used by metabox for file upload.
However, when I try to bind the FileUploaded
event using this code:
plupload.Uploader.bind("FileUploaded", function(up,files){
console.log("file uploaded");
});
this event does not fire at all. Could you please point me in the right direction on how can I correctly bind the events to the file upload field. Or how can I disable the form submit while the files are being uploaded.
Any help appreciated, thanks!