[WEB4LIB] uploading via HTML forms

Eric Hellman eric at openly.com
Tue Nov 23 19:20:38 EST 1999


There is a bug in Mac Internet Explorer's implementation of http 
upload. It  binhexes the file, so that the file type and creator 
strings are appended to the front.

At least one version of Netscape for Mac does the "correct" thing, 
which is to just send the data fork. Very few http upload servers 
handle the variations in Mac client behavior correctly.

Another possibility is that the server is just brain-dead about file 
names. (It might insist on Windows extensions, for example) If it 
doesn't work on Netscape 4.5+, my guess it's something like that.

Eric


>Any suggestions on why a form like the following, used to upload a file to a
>remote web server,  would work from Windows but not from a Mac (Explorer 4.5
>or Netscape 4.06)?
>
>----------
><FORM METHOD="POST" ACTION="second" ENCTYPE="multipart/form-data">
><B>Enter the file to upload:</B> <INPUT TYPE="file" NAME="filename"><br>
><INPUT TYPE="submit" NAME="submit" VALUE="Upload File"></B></CENTER>
></FORM>
>----------
>
>This form results in a text field, a "Browse..." button, and an "Upload
>File" (i.e. submit) button.  Clicking on the Browse button brings up a
>standard open file dialog box, and making a selection puts the selected
>file's name in the text field. Clicking on the Upload button, however, only
>brings up the page called by the action="second" parameter (the next page in
>the sequence) -- the selected file is not uploaded.  The same form viewed on
>a PC (Netscape4.x) does upload the selected file prior going to the next
>page.
>
>The only visible difference between the form in Windows and on a Mac is that
>the former shows an entire path name in the text field (c:/...), and the
>field is editable, while on a Mac only the file name appears (no path info),
>and the text field is not editable (either before or after selecting a
>file).
>
>(The page containing this form is at our regional library system, which runs
>a community information network with web hosting services for any business
>or organization.  The page is part of an "automatic page generating system"
>that enables a user to build a complete web page without having to enter any
>HTML or FTP any files.  A series of setup pages enables them to upload a
>graphic (i.e. logo), enter a description of their business/organization,
>enter info on links to other pages, choose from a variety of page templates,
>etc.,  and end up with a completed web page.)
>
>
>
>
>Kevin Justie
>Ass't. Director, Head of Technical and Automated Services
>Morton Grove Public Library
>Morton Grove, IL
>(847) 965-4220
>kjustie at webrary.org
>http://www.webrary.org
>Opinions expressed are those of the author and do not necessarily reflect
>official Library policy.

Eric Hellman
Openly Informatics, Inc.
http://www.openly.com/           21st Century Information Infrastructure


More information about the Web4lib mailing list