How can I read a file using FileReader() without it blocking I/O while reading? The following is how I am doing it now:
function readImageFile(imageFile, callback) {
var reader = new FileReader();
reader.onload = function(e) {
callback(e.target.result);
};
reader.readAsDataURL(imageFile);
}
Which works fine except that I need to process very large images (> 4k resolution) which takes a considerable amount of time. I can't have user input blocked from using other features on the page while reading.
readImageFilewould be blocking?