File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Problem in uploading file through commons fileupload Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Problem in uploading file through commons fileupload" Watch "Problem in uploading file through commons fileupload" New topic
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in uploading file through commons fileupload
 
Similar Threads
problem with upload file using common file upload servlet
Upload Image to database through Servlet
file upload problem
File Upload is Not Finding Source File
Filtering File Uploaded to server