title: How to remove an element from File List?
body: <p>I have a multiple file upload. I want to remove the selected index from the file list using jquery. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var x = document.getElementById("thumb");
  $('body').on('click', 'a.cvf_delete_image', function (e) {
      e.preventDefault();
      $(this).parent().remove('');
      var y =x.files;
      var file = $(this).parent().attr('file');
      for (var i = 0; i &lt; storedFiles.length; i++) {
          if (storedFiles[i].name == file) {
              storedFiles.splice(i, 1);
              y.splice(i, 1);
              break;
          }
      }
  
     // var actual_file = $("#thumb").files(storedFiles);
  
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>this is what I tried but <code>y.splice(i, 1);</code> is not working</p>