I _finally_ figured this one out.  In most of my form action scripts I
employ a tag which strips white space from all form fields.  If that tag
is allowed to touch the file upload fields, then I get the error message.
I've built in an exception list attribute into the trimming tag and if I
except those file input fields then I get the expected results.

----- Original Message -----
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 20, 2004 1:06 PM
Subject: CFFile upload problem

> CF5.  I'm having a bit of a time using cffile action="" used
it
> in the past with no problems, but for some reason...
>
> I've got a large form containing an input field of type="file".
>
> <form name="myform action="" method="post"
>       enctype="multipart/form-data">
> <input type="file" name="premphoto" size=50 maxlength=100>
> ...
> </form>
>
> In the action template, I have
>
> <cffile action=""> >         filefield="premphoto"
>         accept="image/jpg,image/gif"
>         destination="D:\web\prem\"
>         nameconflict="overwrite">
>
> The error I get is:
>
> Error in CFFILE tag
> The form field specified in the CFFILE tag (PREMPHOTO) does not contain
an
> uploaded file. Please be sure that you have specified the correct form
> field name.
>
> So, what am I doing wrong, or how to debug?
>
> A couple other questions:
>
> Can I have more than a single input field of type="file" on a form?
>
> Since the file upload isn't required, what is the best way to test for
the
> existance of an uploaded file before doing the <cffile action=""> > Will the test Len(form.premphoto) tell me if a file has been uploaded?
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to