title: getting size 0 when creating a File in javascript
body: <p>I'm trying to create a file from some base64 data i get from the camera plugin in Ionic. I'm using a function i got from another stackoverflow's answer.
  The problem is that the file created has size: 0 and the name property seems to be the Uint8array I pass on creation.</p>
  
  <p>This is the function to convert the Base64 data: (the first two lines are commented because the data doesn't have the "data:image/jpeg;base64," beginning)</p>
  
  <pre><code>_dataURLtoFile(dataurl, filename) {
      let //arr = dataurl.split(','),
          //mime = arr[0].match(/:(.*?);/)[1],
          bstr = atob(dataurl),
          n = bstr.length,
          u8arr = new Uint8Array(n);
  
      while(n--){
          u8arr[n] = bstr.charCodeAt(n);
      }
      return new File([u8arr], filename, {type:'image/jpeg'});
    }
  </code></pre>
  
  <p>this is what I get in the console:</p>
  
  <pre><code>File {name: Array(1), localURL: "archivo", type: {…}, lastModified: null, lastModifiedDate: null, …}
  end: 0
  lastModified: null
  lastModifiedDate: null
  localURL: "archivo"
  name: [Uint8Array(268175)]
  size: 0
  start: 0
  type: {type: "image/jpeg"}
  __proto__: Object
  </code></pre>