On Tue, 12 Mar 2002, John Saylor wrote:

> Hi
>
> ( 02.03.12 06:57 -0500 ) Rich Bowen:
> > Comments welcome, YMMV, Caveat Emptor, and all that.
>
> I have found that some browsers put the file in the value matching the
> parameter name instead of putting a file upload object there. So your
> code should check the value to see if it is a path AND a one liner
> BEFORE trying to create the file upload object.

That's not really necessary, as Apache::Request does that for you. If
the upload method fails, then you won't get anything in the UPLOAD key.
The generic form handler does not know what field(s) in your form were
file upload forms, and so this method just lets you check the one key
(UPLOAD) and, if it is defined, then you know you got something.

Hopefully, *all* browsers put the file name in the parameter, since that
is the defined behavior. However, regardless of this, the file upload
object contains all the necessary information to reconstruct the file,
so you don't even have to look in that field.

-- 
Rich Bowen
Apache Administrators Handbook
ApacheAdmin.com

Reply via email to