Yes, it is true that the browser will show in the text field just the file name without the path. But that text field is not passed in the form if the input type is file. What is passed is the binary info. The filename can be retrieved with a hidden field and javascript like so:
<FORM NAME="fileUpload" ACTION="<@CGI><@APPFILE>" METHOD="POST" ENCTYPE="multipart/form-data"> File to upload: <INPUT TYPE="FILE" NAME="file"> <INPUT TYPE="HIDDEN" NAME="fileName"> <INPUT TYPE="BUTTON" VALUE="Upload" onClick="document.fileUpload.fileName.value=document.fileUpload.file.val ue;document.TheForm.submit();"> </FORM> The argument "fileName" will be the file name will be the filename with the full path like so: win: c:\path_to_file\thefile.ext mac os 9 and x: /path_to_file/thefile.ext The argument "file" will contain the binary data of the file. As far as I know the text that you see in the "file" field is not passed at all. Robert. On Sunday, September 8, 2002, at 05:54 PM, JJ Smith wrote: > Thanks Robert, > > With ie 5.1.4 and OS 10.2 the value in the text box is > just the filename and the extension. > > If the full path is being returned on Mac (whatever > version) as described below then the tokenizing will > be affected and the logic will have to be based on "/" > rather than "\" as pointed out by by Robert > previously. > > I thought I had got away with this but now I need to > go back and put the "/" logic in to allow for Mac. > > Thanks again for pointing this out, > JJ > > > > > > > > > --- Robert Garcia <[EMAIL PROTECTED]> wrote: >> I have, on OS 9 and OS X with IE 5+ the full path is >> returned with the >> "/" as the delimiter. >> >> Robert Garcia >> >> On Sunday, September 8, 2002, at 04:15 PM, JJ Smith >> wrote: >> >>> Does it matter in this situation anyway as I >> thought >>> in IE on a Mac when you hit browse the full path >> is >>> not returned - just the filename and extension. >> Thus >>> in this case the tokenizing would still give the >>> desired result. >>> >>> Can some mac people check when you hit browse and >>> browse to the file whether or not the path is >>> returned. >>> >>> Thanks in advance, >>> JJ >>> >>> --- Robert Garcia <[EMAIL PROTECTED]> wrote: >>>> No, even on OS 9, the file name from the browser >>>> uses "/". >>>> >>>> Robert. >>>> >>>> On Saturday, September 7, 2002, at 09:37 AM, >> Ford >>>> Pedersen wrote: >>>> >>>>>> If you have any mac clients, you must determine >>>> the platform first. >>>>>> Mac uses "/", where windows uses "\". >>>>> >>>>> Slight correction. Mac OS 9 and below use ":". >>>> Unix/Linux family & Mac >>>>> OS X use "/". And Windows of course uses "\". >>>>> >>>>> HTH, >>>>> Ford >>>>> >>>> >>> >> > _______________________________________________________________________ >>>> >>>>> _ >>>>> TO UNSUBSCRIBE: send a plain text/US ASCII email >>>> to >>>>> [EMAIL PROTECTED] >>>>> with unsubscribe witango-talk in >>>> the message body >>>>> >>>> >>>> -- >>>> >>>> Robert Garcia >>>> BigHead Technology >>>> 2781 N Carlmont Pl >>>> Simi Valley, CA 93065 >>>> Phone 805.522.8577 >>>> http://www.bighead.net/ >>>> http://www.theradmac.com/ >>>> [EMAIL PROTECTED] >>>> >>>> >>> >> > _______________________________________________________________________ >> >>> _ >>>> TO UNSUBSCRIBE: send a plain text/US ASCII email >> to >>>> [EMAIL PROTECTED] >>>> with unsubscribe witango-talk in >> the >>>> message body >>> >>> >>> __________________________________________________ >>> Do You Yahoo!? >>> Yahoo! Finance - Get real-time stock quotes >>> http://finance.yahoo.com >>> >> > _______________________________________________________________________ >> >>> _ >>> TO UNSUBSCRIBE: send a plain text/US ASCII email >> to >>> [EMAIL PROTECTED] >>> with unsubscribe witango-talk in >> the message body >>> >> >> -- >> >> Robert Garcia >> BigHead Technology >> 2781 N Carlmont Pl >> Simi Valley, CA 93065 >> Phone 805.522.8577 >> http://www.bighead.net/ >> http://www.theradmac.com/ >> [EMAIL PROTECTED] >> >> > _______________________________________________________________________ > _ >> TO UNSUBSCRIBE: send a plain text/US ASCII email to >> [EMAIL PROTECTED] >> with unsubscribe witango-talk in the >> message body > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Finance - Get real-time stock quotes > http://finance.yahoo.com > _______________________________________________________________________ > _ > TO UNSUBSCRIBE: send a plain text/US ASCII email to > [EMAIL PROTECTED] > with unsubscribe witango-talk in the message body > -- Robert Garcia BigHead Technology 2781 N Carlmont Pl Simi Valley, CA 93065 Phone 805.522.8577 http://www.bighead.net/ http://www.theradmac.com/ [EMAIL PROTECTED] ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body
