title: Adding a listener after a file has been selected for upload
body: <p>I am using rails file_field tag to upload a file as follows:</p>
  
  <pre><code>&lt;%= f.file_field :image, :class =&gt; 'file_field' %&gt;
  </code></pre>
  
  <p>Using some css work arounds I created a button to upload a file (the whole thing is clickable):</p>
  
  <p><img src="https://i.stack.imgur.com/yr2fA.png" alt="enter image description here"></p>
  
  <p>After the user clicks on the button and chooses a file, I would like to give the user some indication that a file has been selected for upload before the user submits the form. Otherwise, the user will have no idea that a file has been selected.</p>
  
  <p>What method could I use (whether it be within Rails or a Javascript event handler) that would allow me to give the user such an indication?</p>