Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
So I have this app that reads a file uploaded from the client (index.html) I want to get the file that was uploaded on html and user it on my app.js to read it.
How do I do that.
Here goes the files bellow:

index.html

 <input type="file" id="myFile" name="filename">
 <input type="submit">

app.js

 var fs = require('fs');
 var readMe = fs.readFileSync(??? , 'utf8');
 console.log(readMe);


What I have tried:

I have tried this way:
var file = ("document.getElementById("")");
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900