browser based file upload question

by Mike Cunningham <mike(at)imagebusiness.com>

 Date:  Tue, 20 Nov 2001 14:37:19 -0500
 To:  hwg-servers(at)hwg.org
  todo: View Thread, Original
I am having a curious problem with browser based file upload and wondered 
if anyone here might have some input on it. The pages in question are 
ColdFusion but I assume the issues are cross language/platform. I have some 
forms which contain INPUT TYPE="FILE" fields. When a user submits the form, 
they may or may not have specified a file to upload. That is to say, there 
are other fields and the file upload field is optional. As long as they 
have specified a file to upload, everything works fine. It is when no file 
is specified that things go wrong.

On all Windows browsers tested, the browser seems to send an empty string, 
the same as if the field were an empty text field. This is also the 
behaviour on version 4 browsers on the Mac.

The peculiar behaviour happens with newer browsers on the Mac. In IE5, the 
browser seems to send a value of:

".."

Netscape 6 on the other hand, sends no value (ie: undef).

I guess I'm wondering whether these 2 Mac browsers are behaving as they 
should. Is it up to the user agent to decide what value to send for an 
unspecified file field?

Please cc me as I am on the digest. Thanks.
---
Mike Cunningham
www.shiny.ca

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA