Archived from the Transloadit support forum. Originally posted on January 22, 2014; details may be outdated, see our docs for current behavior. Original thread
So I recently noticed on our application that whenever a transloadit upload failed (with a filter rejecting a file type, for example), the file input was no longer reacting to changes. I later realised that this was caused by the fact that the transloadit jquery plugin clones the file input that is submitted, and this cloned input was triggering my ‘change’ event, but with an empty ‘files’ property.
Manually removing this input fixed that problem, but I still have another issue which I believe is related to these cloned elements which don’t seem to be removed after an upload failure. My remaining problem is that I can no longer resubmit the form (not even with a different file) after an upload has failed. Calling .submit() on the element has no effect at this point. I’ve noticed that there is also an additional form added to the DOM that remains after a failed upload. I suspect that it might be related to my issue, but removing it doesn’t help in this case.
I think that if I can revert my form to the way it was before calling $(element).transloadit() then I could start over from scratch and be able to submit again, but I can’t seem to unbind transloadit completely. I also tried using .unbind(‘submit.transloadit’) with no luck, so any help is appreciated. Thanks