Using CF to write binary

I need to use CF to write a binary file. I am copying from a remote server. I can copy binary with cfhttp, but I cannot write binary because cffile just does a text write.
DataCollabAsked:
Who is Participating?
 
_agx_Connect With a Mentor Commented:
Have you tried using the "getAsBinary"  and "path" attributes of cfhttp?


   
0
 
_agx_Commented:
Cffile works fine for me

<cfhttp  method="Get"
      getAsBinary="yes"
    url="http://images.google.com/intl/en_ALL/images/images_hp.gif">

<cffile action="write" file="c:\temp\myBinaryFile.gif" output="#cfhttp.fileContent#">
0
 
DataCollabAuthor Commented:
Thanks aqx. the cfhttp worked excellently.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.