on 03-06-2009 9:50 AM
Hi Experts,
I have to get the complete file path when I use fileupload UI Element. but I am not able to achive this.
I used a File Upload UI, with filename property mapped to string variable filename and Data mapped to a binary variable filedata.
I tried to get the file name in below ways
1. wdContext.nodefile().currentfileelement.getfilename();
and
2. through modifiablebinary type also.
but in both cases I am getting only the file name, but not the complete path.
Is there any way that I can get the file path.
If I uplod a file in D drive (example.txt),
I am getting the file name as example.txt but I want to get it as D://example.txt
Please help me,
Regards,
Srinivas
Hi
What Stream are you using for read a file ?
InputStream inputStream = resource.read(false);
File filePath = new File(inputStream.toString());
wdComponentAPI.getMessageManager().reportWarning(filePath .getAbsolutePath());
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.