commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jubert Ledesma <kurayonchinc...@gmail.com>
Subject Re: [fileupload] getting filename from FileItem in browser independent way
Date Wed, 04 Oct 2006 00:51:09 GMT
Add into your script to check which browser a person is using. then if 
He/she is using IE then crop the last part before the first \ from the 
end of the whole string. Hope that makes it easier.

Jacob Fenwick wrote:
> Hello,
>
> I've built a fileupload jsp and I want to get the original filename of 
> a file. I put the file into a FileItem object and use the getName 
> function. When I'm in Firefox it works perfectly, as it gets just the 
> name and not the path. However when I'm in IE it uses the entire path 
> of the file as the name. I want it to work the way it does in Firefox, 
> I want to get only the name and not the path. Has anyone encountered 
> this problem, and if you did, how did you solve it?
>
> Thanks,
> Jacob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message