| Author |
Problem in uploading file through commons fileupload
|
amit sharma
Ranch Hand
Joined: Jul 19, 2006
Posts: 129
|
|
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.
|
 |
amit sharma
Ranch Hand
Joined: Jul 19, 2006
Posts: 129
|
|
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
|
 |
 |
|
|
subject: Problem in uploading file through commons fileupload
|
|
|