Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js get bytearray from file

document.querySelector('input').addEventListener('change', function() {

  var reader = new FileReader();
  reader.onload = function() {

    var arrayBuffer = this.result,
      array = new Uint8Array(arrayBuffer),
      binaryString = String.fromCharCode.apply(null, array);

    console.log(binaryString);

  }
  reader.readAsArrayBuffer(this.files[0]);

}, false);
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to go to next page on button click js 
Javascript :: javascript how to set cursor for whole page 
Javascript :: window closing event js 
Javascript :: express download file 
Javascript :: how to import jquery in js file 
Javascript :: for in object javascript 
Javascript :: Mongoose - populate nested array 
Javascript :: how to use more than one transform in javascript 
Javascript :: infinite loop javascript 
Javascript :: bootstrap cdn for react 
Javascript :: js skip to next iteration 
Javascript :: add variables in javascript 
Javascript :: react native shaddow 
Javascript :: mongo query by object id node js 
Javascript :: convert timestamp to date javascript 
Javascript :: setinterval vs settimeout js 
Javascript :: three js get size of object 
Javascript :: canvas umu 
Javascript :: how to check if a string is alphabetic in javascript 
Javascript :: new date() in javascript 3 days from now 
Javascript :: date split in javascript 
Javascript :: mongoose find and update prop 
Javascript :: javascript traverse 
Javascript :: convertir seconde 
Javascript :: wordpress ajax url 
Javascript :: jquery selector checked 
Javascript :: sum numbers recursively js 
Javascript :: ajax post body parameters 
Javascript :: float to currency 
Javascript :: node uuid 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =