Convert an image from CFHTTP filecontent to binary data with Coldfusion
问题 I'm trying to convert an image (jpg) loaded via cfhttp to binary data. I can't use cffile action="readBinary" as it is not a local file. 回答1: Here's how I handle this, and I use this to grab and process hundreds of images a day with ColdFusion 8. <cfhttp timeout="45" throwonerror="false" url="http://domain/image.jpg" method="get" useragent="Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12" getasbinary="yes" result="local.objGet" > <cfset local