cffile upload error enctype cf7
Been years since I worked with cffile and all of a sudden the rust is all over me.Done this a hunred times before ... using CF7.
Tried using cfform and cfinput instead ... what simple oversight am I missing?
I am getting the error
Invalid content type: "application/x-www-form-urlencoded"
CFFILE action="upload" requires forms to use enctype="multipart/form-data"
Uploading a .pdf to a valid path
The form page looks simple enough
<form action="" name="add_Inv" method="post" enctype="multipart/form-data">
<input class="pfs" type="File" name="agmt" size="20" maxlength="100" >
<input type="button" value="Apply Hdr." onClick="aplHdr(this.form)" class="whatever">
</form>
<cfoutput><script language="javascript">
function aplHdr(form){
form.action='equipment_config.cfm?page=accounting&tab=invoices&mid=#url.mid#&header=#grpfwd#';
form.submit();
}
</script></cfoutput>
<cfif isdefined('form.agmt')>
<cfquery name="key" datasource="#datasource#">
select key_code from member
where member_id=#url.m#
</cfquery>
<cfoutput> <cffile
action = "upload"
destination = "c:\inetpub\wwwroot\*******\coldfusion\agreements\#trim(key.key_code)#"
fileField = "agmt"
nameConflict = "makeUnique"
accept="application/doc,application/octet-stream,application/pdf,.doc,.pdf,.tmp,.txt,text/plain,.html,application/msword, image/*"
></cfoutput>
</cfif>
