How do I pass a file/document as a JavaScript argument? (Using HTML)


I'm using HTML to get a file from local disk using input type="text".
I want to pass the file as an argument to a Javascript code that will convert it to base64.

I cannot figure out how to pass the file to the JS code.
Top Bottom