So let's say I have <input type="file">
and I click on <button onclick="code:D()">
what I want is to find the file's name and code with javascript, I can already find the name with document.getElementById("fileid").files[0];
but I want to see the raw code without a download, how?
Asked
Active
Viewed 31 times
0
-
1[FileReader](https://developer.mozilla.org/en-US/docs/Web/API/FileReader) – Jaromanda X May 15 '20 at 04:42
-
I haven't use this, but https://gist.github.com/gipi/3129800 link might work for you. give it a try – Gulam Hussain May 15 '20 at 04:44
-
Raw code ?...do you want to read file content, then look into this [File Reader - SO](https://stackoverflow.com/a/754398/11719787) – Sameer May 15 '20 at 04:49