I am having issues with trying to upload a file when the form that has the 
cfinput in it is nested inside of a cfdiv. Here is a simple version of the 
problem:

<cfif isDefined('cmd')>

<cffile action="upload" destination="#application.photoPath#" filefield="file1">

</cfif>

<cfdiv>

<cfform name="form1" enctype="multipart/form-data">

<cfinput name="file1" type="file">

<cfinput name="cmd" type="submit" value="Add">

</cfform>

</cfdiv>


This errors out with this error:

"Invalid content type: application/x-www-form-urlencoded. The cffile 
action="upload" requires forms to use enctype="multipart/form-data"."

As you can see I am setting the content type to multipart/form-data but it is 
ignoring it. I guess it has something to do with the way the form is submitted 
when it is in the cfdiv. This same code works with without the cfdiv, but I 
need it inside of the cfdiv.

Any ideas?

Thanks. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287240
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to