DIGIT-ARC read-only archive · snapshot: July 23, 2026

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

1 post · originally from https://geek.digit.in/community/threads/how-do-i-pass-a-file-document-as-a-javascript-argument-using-html.174304/

doomgiver
doomgiver Original post #1
May 29, 2013 at 8:57 AM
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.