You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jawed Nazar Ali <ja...@spectrum-tech.com> on 2006/04/15 13:20:14 UTC

commons-Upload: FileItem.getName()

Hello,

 

FileItem.getName(); function return: file name only when mozilla browser
used and it returns complete path with name when IE is used?

 

I know this is browser specific functionality, but Don't you think
FileItem.getName() should return only file name regardless of the browser.

 

I don't understand why this method functions this way? If we are using
standard APIs then method functionality should be standard too.

 

Please have your say on this post.

 

 

Regards,

Jawed Nazar Ali

 


Re: commons-Upload: FileItem.getName()

Posted by Mark <el...@gmail.com>.
Or a convenience method that returns either the filename or path. 
Similar to how the java.io.File class works.  In the case of Mozilla,
both methods would just return the same value.


On 4/15/06, Tahir Akhtar <ta...@spectrum-tech.com> wrote:
> Anyone wrote a wrapper for this?
>
> I think most developers support IE and the only useful part during an upload
> scenario is filename. So everyone must have written some method to extract
> filename from the whole path.
>
> Do we need a simple substring or additional stuff needs to be handled?
> IE runs on windows so we can be sure of that separator is "\" and not "/"
> etc, right?
>
> -----Original Message-----
> From: Mark [mailto:elihusmails@gmail.com]
> Sent: Saturday, April 15, 2006 5:05 PM
> To: Jakarta Commons Users List; jawed@spectrum-tech.com
> Subject: Re: commons-Upload: FileItem.getName()
>
> I agree.  Just because the browsers can't be consistent, doesn't mean
> this library can't be....
>
>
> On 4/15/06, Jawed Nazar Ali <ja...@spectrum-tech.com> wrote:
> > Hello,
> >
> >
> >
> > FileItem.getName(); function return: file name only when mozilla browser
> > used and it returns complete path with name when IE is used?
> >
> >
> >
> > I know this is browser specific functionality, but Don't you think
> > FileItem.getName() should return only file name regardless of the browser.
> >
> >
> >
> > I don't understand why this method functions this way? If we are using
> > standard APIs then method functionality should be standard too.
> >
> >
> >
> > Please have your say on this post.
> >
> >
> >
> >
> >
> > Regards,
> >
> > Jawed Nazar Ali
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.4.1/312 - Release Date: 4/14/2006
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.4.1/312 - Release Date: 4/14/2006
>
>
>
> ---------------------------------------------------------------------
> 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


RE: commons-Upload: FileItem.getName()

Posted by Tahir Akhtar <ta...@spectrum-tech.com>.
Anyone wrote a wrapper for this? 

I think most developers support IE and the only useful part during an upload
scenario is filename. So everyone must have written some method to extract
filename from the whole path. 

Do we need a simple substring or additional stuff needs to be handled? 
IE runs on windows so we can be sure of that separator is "\" and not "/"
etc, right?

-----Original Message-----
From: Mark [mailto:elihusmails@gmail.com] 
Sent: Saturday, April 15, 2006 5:05 PM
To: Jakarta Commons Users List; jawed@spectrum-tech.com
Subject: Re: commons-Upload: FileItem.getName()

I agree.  Just because the browsers can't be consistent, doesn't mean
this library can't be....


On 4/15/06, Jawed Nazar Ali <ja...@spectrum-tech.com> wrote:
> Hello,
>
>
>
> FileItem.getName(); function return: file name only when mozilla browser
> used and it returns complete path with name when IE is used?
>
>
>
> I know this is browser specific functionality, but Don't you think
> FileItem.getName() should return only file name regardless of the browser.
>
>
>
> I don't understand why this method functions this way? If we are using
> standard APIs then method functionality should be standard too.
>
>
>
> Please have your say on this post.
>
>
>
>
>
> Regards,
>
> Jawed Nazar Ali
>
>
>
>
>

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

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/312 - Release Date: 4/14/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/312 - Release Date: 4/14/2006
 


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


Re: commons-Upload: FileItem.getName()

Posted by Mark <el...@gmail.com>.
I agree.  Just because the browsers can't be consistent, doesn't mean
this library can't be....


On 4/15/06, Jawed Nazar Ali <ja...@spectrum-tech.com> wrote:
> Hello,
>
>
>
> FileItem.getName(); function return: file name only when mozilla browser
> used and it returns complete path with name when IE is used?
>
>
>
> I know this is browser specific functionality, but Don't you think
> FileItem.getName() should return only file name regardless of the browser.
>
>
>
> I don't understand why this method functions this way? If we are using
> standard APIs then method functionality should be standard too.
>
>
>
> Please have your say on this post.
>
>
>
>
>
> Regards,
>
> Jawed Nazar Ali
>
>
>
>
>

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