[Zope] [OffTopic]Browser Specific Issue
Jens Vagelpohl
jens@zope.com
Wed, 4 Jun 2003 08:00:37 -0400
apart from the issue whether file_name returns a string containing path
or name or a real file upload (which it should, if it does not your
form is buggy), IE mis-behaves (oh wonder) in revealing full paths
instead of just the file name.
if the form is done right you will get a HTTPFileUpload instance which
behaves like a python file. it has an attribute "filename" that
contains the name of the file. in IE, you get the full path, which is
wrong for most applications. in all other browsers you get just the
file name.
jens
On Wednesday, Jun 4, 2003, at 04:42 US/Eastern, 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
> browsers.
>
> 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.
>
> Thanks in Advance
>
> Shashank