title: Multiple files upload and using file reader to preview
body: <pre><code>&lt;input type='file' name="image"  onchange="preview(this);" multiple="multiple" /&gt;
  
  
  window.preview = function (input){
          if(input.files &amp;&amp; input.files[0]) {
  
              var reader = new FileReader();
  
              reader.readAsDataURL(input.files[0]);
              reader.onload = function(e){
  
                  $("#previewImg").append("&lt;img src='" + e.target.result +"'&gt;");
  
  
              }
          }
      }
  </code></pre>
  
  <p>I have a function using file reader to preview image, It works fine in single file.</p>
  
  <p>However I try to achieve multiple files.</p>
  
  <p>My question is how to get input files array, loop files through file reader and append img</p>