[Zope] [OffTopic]Browser Specific Issue

Richard Barrett R.Barrett@ftel.co.uk
Wed, 04 Jun 2003 13:53:00 +0100

At 09:42 04/06/2003, Shashank Ashtikar wrote:
>Hi Everyone,
>This is not a Zope related question but I am posting it here since it is
>likely that some of you may have encountered it and solved it.
>So my apologies.
>I am working on a form where user is expected to browse the homes for a file
>and select the one he desires to be processed. I am using following statement
>to display the necessary control.
><input type="File" name="file_name">
>On IE when I use file_name I get complete path of the file which is 
>exactly what
>I desire.but on GNU/Linux based Web Browsers like mozilla, galeon etc. 
>only name
>of the file is returned. How can I get the complete path even on these 

Non-MS browser on Windows, such as Netscape 7 and Opera do not supply the 
complete path. IE seems to alone in exhibiting this behaviour, which is 
questionable from a security standpoint.

>The form is written entirely in dtml.
>I ve looked for answers via Google but I hv not had much luck so far.
>It is obvious from the question that I am lame at HTML. But please 
>help/pointers anybody.

According to the relevant RFC, supplying the filename is not mandatory and 
certainly the full file path is not required. I do not know why you want 
the full path as this is, broadly speaking, irrelevant to the server as, 
presumably, it does not have access to the filespace on the client 
uploading the file. Certainly the client is not required to supply the full 

<quote document="RFC1867" section="3.3 use of multipart/form-data">
    The original local file name may be supplied as well, either as a
    'filename' parameter either of the 'content-disposition: form-data'
    header or in the case of multiple files in a 'content-disposition:
    file' header of the subpart. The client application should make best
    effort to supply the file name; if the file name of the client's
    operating system is not in US-ASCII, the file name might be
    approximated or encoded using the method of RFC 1522.  This is a
    convenience for those cases where, for example, the uploaded files
    might contain references to each other, e.g., a TeX file and its .sty
    auxiliary style description.

>Thanks in Advance
>Zope maillist  -  Zope@zope.org
>**   No cross posts or HTML encoding!  **
>(Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )