aspose file tools*
The moose likes Other Open Source Projects and the fly likes apache commons - file upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "apache commons - file upload" Watch "apache commons - file upload" New topic
Author

apache commons - file upload

Greeshma Sanigar
Greenhorn

Joined: Oct 23, 2008
Posts: 3
Hello All,

I'm using apache commons fileupload to upload a file ...I need to throw an error message if the file is not found, this happens if the user mistypes the path or edits the browsed path ... I can check the size but it is also possible to upload a file with 0 bytes...

Help is greatly appreciated..

Thanks...
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19538
    
  16

"greesh",

Your name violates our naming policy. Please change it accordingly.

Thank you,

Rob


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Tha�s Manfrim Firmino
Ranch Hand

Joined: Apr 12, 2004
Posts: 48
Please post your code so it's easier to say what to modify.


Tha�s M. K. M. Firmino
Tha�s Manfrim Firmino
Ranch Hand

Joined: Apr 12, 2004
Posts: 48
I was wondering... when you read the request on the server side maybe you will be no able anymore to distinguish if the file exists or not since you said you can accept empty files.

What about doing a local validation before sending the file name to the server? I mean, you can create a function before submiting the form verifying if the file exists (so it will be done on the local machine).

I hope my suggestion help. Please let me know if you need further explanation.

Good luck!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: apache commons - file upload
 
Similar Threads
how to read the multipart form-data file content in servlet?
get full path
browse button returning just filename in Firefox
Cannot get the complete filename
Loadjava program