JavaScript FileReader
Read files in the browser with JavaScript using the FileReader API. From input file types or dragging and dropping files. Parse CSV and grayscale an image in the browser.
MDN FileReader: https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications
Code examples from this video: https://github.com/shama/letswritecode/tree/master/javascript-filereader
source