Hi i am selecting a txt/XLS file through and need to pass the same to a function to read the content and its not happening for me ....... how can i pass file path to file content reader Function
Code am using to Browse file:
<input type="file" name="uploadfile" id="uploadfile" size="40" value=""/>
BufferedReader bF = new BufferedReader(new FileReader(*** File Path here ***));
BufferedReader bF = new BufferedReader(new FileReader("cia.txt"));
I want to get dy开发者_开发问答namic selected files into file reader......
Thank you..
If variable "uploadfile"
is an File type variable(need to be) then try uploadfile.getAbsolutePath()
Btw what server side technology you are using(framework)
You need to use something like Apache Commons FileUpload to process uploaded files.
精彩评论