file upload path gives full path

317 views
Skip to first unread message

sreenivas

unread,
Dec 4, 2012, 12:30:17 AM12/4/12
to google-we...@googlegroups.com
Hi,

I am uploading a file to server. when from firefox , it is giving only the file name, when i access through fileItem.getName(). But with chrome it is coming something like this. c:/fakepath/fileName. How to avoid this fakepath string to come to server and get only the file name?

Thanks,
Sree

Thad

unread,
Dec 6, 2012, 5:44:45 PM12/6/12
to google-we...@googlegroups.com
Try Apache Commons IO (http://commons.apache.org/io/), org.apache.commons.io.FilenameUtils

Jim Douglas

unread,
Dec 6, 2012, 11:38:10 PM12/6/12
to Google Web Toolkit
You'll find more than you want to know about it if you google
fakepath.

http://blogs.msdn.com/b/ie/archive/2009/03/20/rtm-platform-changes.aspx
Reply all
Reply to author
Forward
0 new messages