title: How to map through an array of input files?
body: <p>I have two functions: one that turn files into dataUrl and another that returns a promise with the result:</p>
  
  <pre><code>fileToDataURL(file) {
    var reader = new FileReader()
    return new Promise(function (resolve, reject) {
      reader.onload = function (event) {
        resolve(event.target.result)
      }
      reader.readAsDataURL(file)
    })
  }  
  
  getDataURLs (target) {
    // target =&gt; &lt;input type="file" id="file"&gt;      
    return Promise.all(target.files.map(fileToDataURL))
  }
  </code></pre>
  
  <p>target.files.map returns: <code>TypeError: target.files.map is not a function</code>. H</p>
  
  <p>How to modify <code>getDataUrls</code> so it returns an array with the dataUrls?</p>