I use the commons file upload package to upload files.Problem is that it works fine from some pc and fail when i upload it from another pc.
When i upload it form my pc item.getName() gives me only the name of the file and it successfully uploaded.But when i upload it from my friend pc it item.getName() gives the whole path name of file like D:\\ddd\ddd.xls and my output file path becomes C:\dhar\D:\\ddd\ddd.xls and then it throws error filenotfoundexception.How to resolve this.
Joined: Jul 19, 2006
I resolve the issue.It works in my pc because i use firefox and my friend uses IE.IE gives the whole path .To resolve this use following code.
FilenameUtils is in org.apache.commons.io Hope this helps others