title: Run javascript function after file is added to upload but before submit button
body: <p>I have an input that accepts a file to be uploaded. The problem is that I can not figure out how to call the function after the file is added to the input. </p>
  
  <p>I have tried things like onMouseMove, onClick and onChange but they do not call the function after the file is added to the input. </p>
  
  <pre><code>jQuery('.attachment').click(function(){
    console.log("test");
    checkFile();
  });
  </code></pre>