
Reading local files with JavaScript
If your web app needs access to files on the user's device, there is no direct access possible for security and privacy reasons.
But using file input elements and the FileReader interface, we can still let the user select files for us to access.
Check the article for the examples