Guest User

Untitled

a guest
Jul 21st, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         var reader = new FileReader();
  2.             var fileAsArray = new Uint8Array();
  3.             reader.onload = function(){
  4.             var arrayBuffer = document.getElementById('file').result;
  5.             var array = new Uint8Array(arrayBuffer);
  6.             binaryString = String.fromCharCode.apply(null, array);
  7.             fileAsArray=array;
  8.             console.log(array);
  9.             console.log(fileAsArray);
  10.            
  11.             }
  12.             var file = reader.readAsArrayBuffer(document.getElementById('file').files[0]);
Add Comment
Please, Sign In to add comment