Archived from the Transloadit support forum. Originally posted on November 25, 2010; details may be outdated, see our docs for current behavior. Original thread
My use case:
Form with single input[type=file] box. I bind a click event to the input. When user chooses a file I trigger the upload with a .submit() call, transloadit settings autoSubmit: false, wait: true. I get back my results, and add hidden meta info to the input box via jQuery’s .data().
After the .submit(), the click event handler has been removed from the input, as well as any .data(). It is as if the old input DOM element is either completely replaced or all data associated with it has been erased.
My current work around is (1) rebind my event handler in transloadit’s onSuccess, and (2) don’t use .data() on the file input.