You'll probably get 5 responses anyway here goes:
use the Form field and not the attributes field, FormUrl2Attributes does not
work for file form fields.
So:
<cffile action="UPLOAD"
filefield="MyFile"
destination="#attributes.TempDir#"
nameconflict="OVERWRITE">
HTH,
Noam
----------
From: Mike Sullivan [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, 13 December 2000 16:26
To: Fusebox
Subject: cffile problem uploading <newbie>
Greetings List.
I have a fusebox and a non-fusebox version of a simple upload form.
I am
using cffile action=upload and of course, the non-fusebox version
works and
the fusebox version throws an error stating:
In order to upload a file from a form submission you must
specify a
FILEFIELD attribute to indicate which form field contains the
uploaded
file.<P>This attribute must be a form field name.<P>For example, if
the
input file containing the uploaded file is named 'FileContents' you
would
use the syntax: FILEFIELD="FileContents"<p>The error occurred while
processing an element with a general identifier of (CFFILE),
occupying
document position (2:1) to (5:33).</p>
My form template is dsp_search_form.cfm and looks like:
----------------------------------------------------------------------
<p>Enter the full path name of the file you wish to transfer, or
press the
"Browse" button to look for it. Press "Send It!" to send it.</P>
<form method="post" action="index.cfm">
<table>
<TR>
<input type="hidden" name="fuseaction" value="process">
<b>Full Path Name:</b> <input type="File" name="MyFile">
</tr>
<TR>
<TD> </td>
<TD><input type="submit" value="Send It!"> <input
type="Reset"></td>
</tr>
</table>
</form>
----------------------------------------------------------------------
The "process" action is from template act_sendfile.cfm and looks
like:
---------------------------------------------------------------------
<cffile action="UPLOAD"
filefield="attributes.MyFile"
destination="#attributes.TempDir#"
nameconflict="OVERWRITE">
<cfoutput><h4>#File.serverfile# uploaded!</h4></cfoutput>
---------------------------------------------------------------------
Can anyone see whats wrong?
Thanks
Mike
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists