How to create an ArrayBuffer and data URI from Blob and File objects without FileReader? How to create an ArrayBuffer and data URI from Blob and File objects without FileReader? javascript javascript

How to create an ArrayBuffer and data URI from Blob and File objects without FileReader?


I just put it here:

var input = document.querySelector("input[type=file]");input.addEventListener("change", handleFiles, true);// for urlwindow.URL = window.URL || window.webkitURL;function handleFiles(evnet) {  var file = event.target.files[0];  document.querySelector('iframe')    .setAttribute('src', window.URL.createObjectURL(file));}
<!DOCTYPE html><html><head></head><body>  <form method="get" entype="multipart/form-data" target="binaryFrame">    <input id="#avatar" type="file" name="file" />    <input type="submit" />  </form>  <iframe name="binaryFrame"></iframe></body></html>