title: Any way to automatically reload a file selected from "InputFile" through Filereader?
body: <p>I am trying to display a CSV file into an HTML table.
  I have it set up so that you can pick the CSV and it will successfully show in HTML format.</p>
  <p>Is there anyway to refresh this so that if the selected file Changes, the HTML format will change with it (Without user input re-selected the file.</p>
  <p>Code and Table are below. But basically I would like it so that if the population of New York changed in the table, that the HTML table is automatically updated as well.</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  
  &lt;input type=&quot;file&quot; id=&quot;fileUpload&quot; onchange=&quot;Upload()&quot;/&gt;
  &lt;input type=&quot;button&quot; id=&quot;upload&quot; value=&quot;Upload&quot; onclick=&quot;Upload()&quot; /&gt;
  
  &lt;hr /&gt;
  &lt;div id=&quot;dvCSV&quot;&gt;
  &lt;/div&gt;
  
  &lt;script type=&quot;text/javascript&quot;&gt;
  
      function Upload() {
          var fileUpload = document.getElementById(&quot;fileUpload&quot;);
          var regex = /^([a-zA-Z0-9\s_\\.\-:])+(.csv|.txt)$/;
          if (regex.test(fileUpload.value.toLowerCase())) {
              if (typeof (FileReader) != &quot;undefined&quot;) {
                  var reader = new FileReader();
                      reader.onload = function (e) {
                      var table = document.createElement(&quot;table&quot;);
                      var rows = e.target.result.split(&quot;\n&quot;);
                      for (var i = 0; i &lt; rows.length; i++) {
                          var cells = rows[i].split(&quot;,&quot;);
                          if (cells.length &gt; 1) {
                              var row = table.insertRow(-1);
                              for (var j = 0; j &lt; cells.length; j++) {
                                  var cell = row.insertCell(-1);
                                  cell.innerHTML = cells[j];
                              }
                          }
                      }
                      var dvCSV = document.getElementById(&quot;dvCSV&quot;);
                      dvCSV.innerHTML = &quot;&quot;;
                      dvCSV.appendChild(table);
                 } 
                  reader.readAsText(fileUpload.files[0]);
              } else {
                  alert(&quot;This browser does not support HTML5.&quot;);
              }
          } 
      }
  &lt;/script&gt;
  
  &lt;script type=&quot;text/javascript&quot;&gt;
    Upload();
    setInterval(function(){ Upload(); }, 10000);
  &lt;/script&gt;
  
  &lt;/html&gt;
  </code></pre>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>rank</th>
  <th>place</th>
  <th>population</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>New York</td>
  <td>8175133</td>
  </tr>
  <tr>
  <td>2</td>
  <td>Los Angeles</td>
  <td>3792621</td>
  </tr>
  <tr>
  <td>3</td>
  <td>Chicago</td>
  <td>2695598</td>
  </tr>
  </tbody>
  </table>
  </div>