title: Reset selected file input in JQuery
body: <p>Is there a way to write a jQuery method to delete the selected file to clear it out? How can I pass the file name to jQuery to reset the file input?</p>
  
  <p>I don't want to clear all the files at once.</p>
  
  <p>Here are my files:</p>
  
  <pre><code>&lt;div class="field fieldTEXT"&gt;
      &lt;form:label path="file" cssClass="fieldLabel"&gt;
      Attach Competitor: 
      &lt;/form:label&gt;
  
      &lt;form:input path="file" type="file" cssClass="fileInput" accept="application/pdf"/&gt; &lt;a href="" onclick="RemoveFile();" &gt; Remove&lt;/a&gt;
  &lt;/div&gt;
          &lt;div class="field fieldTEXT"&gt;
              &lt;form:label path="file2" cssClass="fieldLabel"&gt;
                  Attach 2
              &lt;/form:label&gt;
              &lt;form:input path="file2" type="file" cssClass="fileInput"/&gt; &lt;a href="" onclick="RemoveFile();" &gt; Remove&lt;/a&gt;
  
          &lt;/div&gt;
          &lt;div class="field fieldTEXT"&gt;
              &lt;form:label path="file3" cssClass="fieldLabel"&gt;
                  Attach Additional Information:
              &lt;/form:label&gt;
              &lt;form:input path="file3" type="file" cssClass="fileInput" accept="application/pdf"/&gt; &lt;a href="" onclick="RemoveFile();" &gt; Remove&lt;/a&gt;    
          &lt;/div&gt;
          &lt;div class="field fieldTEXT"&gt;
              &lt;form:label path="file4" cssClass="fieldLabel"&gt;
                  Attach Additional Information (If Needed):
              &lt;/form:label&gt;
                  &lt;form:input path="file4" type="file" cssClass="fileInput" accept="application/pdf" /&gt; &lt;a href="" onclick="RemoveFile();" &gt; Remove&lt;/a&gt;
  
          &lt;/div&gt;  
  </code></pre>
  
  <p>In my JS:
  How can I pass the name to my JS file and reset the selected link?</p>
  
  <pre><code>function RemoveFile(name) {
      $('input[type=file]').val('');
  }
  </code></pre>