Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 17035 invoked from network); 23 Jan 2006 09:40:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Jan 2006 09:40:15 -0000 Received: (qmail 38891 invoked by uid 500); 23 Jan 2006 09:40:08 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 38854 invoked by uid 500); 23 Jan 2006 09:40:08 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 38843 invoked by uid 99); 23 Jan 2006 09:40:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2006 01:40:08 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [62.153.151.108] (HELO mail.porta.de) (62.153.151.108) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2006 01:40:07 -0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 3D4BFCA8C82 for ; Mon, 23 Jan 2006 10:39:48 +0100 (CET) Received: from mail.porta.de ([192.168.254.108]) by localhost (ftp.porta.de [192.168.254.107]) (amavisd-new, port 10027) with ESMTP id 01062-06 for ; Mon, 23 Jan 2006 10:39:45 +0100 (CET) Received: from p001ex03.porta.local (unknown [172.16.225.155]) by mail.porta.de (Postfix) with ESMTP id 6A8EACA8C29 for ; Mon, 23 Jan 2006 10:39:46 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [FileUpload] IE vs Firefox X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Mon, 23 Jan 2006 10:39:42 +0100 Message-ID: <201E6F5AC48C274996A5AD8304FAEF86150670@p001ex03.porta.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [FileUpload] IE vs Firefox Thread-Index: AcYeK2RrOOPaIdjQQTyZ+72d+OwmkQB1Xf2A From: "Knezevic, Mihael" To: "Jakarta Commons Users List" X-Virus-Scanned: amavisd-new at porta.de X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N this was discussed several time on the list. perhaps it should be = written down in a FAQ? > -----Original Message----- > From: mfncooper@gmail.com [mailto:mfncooper@gmail.com] On=20 > Behalf Of Martin Cooper > Sent: Saturday, January 21, 2006 2:38 AM > To: Jakarta Commons Users List > Subject: Re: [FileUpload] IE vs Firefox >=20 > First of all, please respect the conventions of this mailing list, and > prefix your subject with the name of the relevant component in square > brackets, as I have done with this reply. See: >=20 > http://jakarta.apache.org/site/mail2.html#Commons >=20 > On 1/20/06, Xav wrote: > > > > Good Morning, > > > > It looks like the fileupload classes parse (or maybe=20 > should) the request > > a little bit differently depending if IE or Firefox is used. > > I use the following code: > > > > List /* FileItem */items =3D upload.parseRequest( request ) ; > > Iterator iter =3D items.iterator() ; > > *while* ( iter.hasNext() ) { > > FileItem item =3D (FileItem) iter.next() ; > > ... > > } > > > > When the item object is a file the method item.getName()=20 > returns just > > the file's name (ex: fooBar.gif) whereas with IE it returns the full > > path of where the file was on the client side (ex:=20 > c:\foo\bar\fooBar.gif). >=20 >=20 > FileUpload is returning to you what the browser sent to the=20 > server. IE sends > the full path; most other browsers send only the file name,=20 > for security > reasons. >=20 > That might be an IE bug but do you think that the fileupload component > > should be changed so that the method getName() always=20 > returns the same > > information regardless of the browser used? >=20 >=20 > FileUpload's job is simply to parse the data sent to the=20 > server, not to > interpret it in any way. You might want only the file name,=20 > but someone else > might want the full path. That's a decision that can only be=20 > made for a > specific application, so it's not something FileUpload should=20 > be doing. >=20 > -- > Martin Cooper >=20 >=20 > Thanks > > Xavier > > > > > >=20 > --------------------------------------------------------------------- > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail:=20 > commons-user-help@jakarta.apache.org > > > > >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org