title: Convert input=file to byte array
body: <p>I try to convert a file that i get through an input file into a byte[].
  I tried with a FileReader, but i must miss something :</p>
  
  <pre><code>var bytes = [];
  var reader = new FileReader();
  reader.onload = function () {
     bytes = reader.result;
  };
  reader.readAsArrayBuffer(myFile);
  </code></pre>
  
  <p>But in the end, my bytes var doesn't content a byte array.</p>
  
  <p>I saw this post : <a href="https://stackoverflow.com/questions/32556664/getting-byte-array-through-input-type-file">Getting byte array through input type = file</a> but it doesn't ends with a byte[], and readAsBinaryString() is deprecated</p>
  
  <p>What do i miss?</p>