title: How to make the following readAsDataURL return multiple readAsDataURLs?
body: <p>This function read files gotten from an input field and return their dataUrls:</p>
  
  <pre><code>readAsDataURL (target) {
    // target =&gt; &lt;input type="file" id="file"&gt;
    var reader = new FileReader()
    return new Promise(function (resolve, reject) {
      reader.onload = function (event) {
        resolve(event.target.result)
      }
      reader.readAsDataURL(target.files[0])
    })
  },
  </code></pre>
  
  <p>As you can see, the function only deals with single files. I want to return multiple files. I tried doing <code>reader.readAsDataURL(target.files)</code> but got this error: <code>'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.</code></p>
  
  <p>How to make the function return multiple dataUrls?</p>