FileReader object in JS

It is an object to data from Blog objects.
it delivers the data using events, reading data from disk may take time.
let reader=new FileReader();
reader.readAsDataURL(file);
reader.onload=function(){
console.log(reader.result);
}
reader.onerror=function(){
console.log(reader.error);
}
reader.progress=function(e){
console.log(e.loaded+'/'+e.total);
}
© 2016 - 2022, All Rights are Reserved.