Thanks for the suggestion. I had already tried moving the </cfhttp> close tag 
to the same line but that didn't help. Based on your comments I shuffled things 
around a bit more and moved the File parameter so that is wasn't the last 
parameter being posted and it now works just fine. 

It's fixed but I'll post the change in case it helps anyone else.



**** did not work (added additional newline to file) ****

<cfhttp method="post" URL="#urlAppBase#/Upload.xml">
  <cfhttpparam name="JSESSIONID" value="#session.SessionID#" type="Cookie" />
  <cfloop collection="#pageParms#" item="parmName">
    <cfhttpparam name="#parmName#" value="#pageParms[parmName]#" 
type="FormField" />
  </cfloop>
  <cfhttpparam type="File" name="inFile" file="#filePath#"></cfhttp>


**** This did work fine *****
<cfhttp method="post" URL="#urlAppBase#/Upload.xml">
  <cfhttpparam type="File" name="inFile" file="#filePath#">
  <cfhttpparam name="JSESSIONID" value="#session.SessionID#" type="Cookie" />
  <cfloop collection="#pageParms#" item="parmName">
    <cfhttpparam name="#parmName#" value="#pageParms[parmName]#" 
type="FormField" />
  </cfloop>
</cfhttp>



>Can you post your code?
>
>Often this kind of thing can be fixed by moving the tags around on the page:
>
>Eg
>
><cfsavecontent....>
>       My content
></cfsavecontent>
>
>is changed to:
>
><cfsavecontent....>My content</cfsavecontent>
>
>Kevin
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: 17 August 2006 13:41
>To: CF-Talk
>Subject: Extra newline when uploading file using <cfhttpparam>
>
>
>I have developed a web page that will post a multipart form with a file to
>another server using a <cfhttpparam type="File"> tag inside a <cfhttp>
>tag. By the time the file has been uploaded to the other server it has an
>additional CR-LF pair of characters. This is being done regardless of the
>type of file or the mimeType attribute set for the cfhttpparam tag. If I
>access a page on the second server outside of ColdFusion and post the same
>file from my browser it makes it to the server without the additional
>characters.
>
>Has anyone else seen this behavior or have any idea how to get around it?
>
>I am using ColdFusionMX server version 6.1.
>
>Thanks
>Raymond Zeigler

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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

Reply via email to