sorry for the ambiguity, getBinaryData is a CFQUERY RecordSet. i left out the query , it was on a different page of my code. a simple call to the database to get some id stuff and whatever...
gl, alex -----Original Message----- From: Ben Koshy [mailto:[EMAIL PROTECTED]] Sent: Monday, October 07, 2002 8:36 PM To: CF-Talk Subject: RE: Saving an "Image" Datatype in CF5 Alexander, Is the getBinaryData a CFQUERY RecordSet? Perhaps you could show your query? I'm not sure where you are getting: getBinaryData.objectID, getBinaryData.UUID, getBinaryData.Extension and base64String? I am familiar with Base64ing binary files and storing them, however in this case it looks like the person is just storing the files directly in binary format in the SQL server. Sincerely, Ben. Ben Koshy Technical Manager W3 International Media Ltd. T.604.871.9899 ext.388 1.866.4.WEB.NOW 'Celebrating 5 years of Internet Service Excellence!' www.w3media.com 'Effective Web Now!' www.w3media.net 'Fast Reliable Hosting!' www.w3registry.com 'Simply Web Domains!' -----Original Message----- From: Sicular, Alexander [mailto:[EMAIL PROTECTED]] Sent: October 7, 2002 3:03 PM To: CF-Talk Subject: RE: Saving an "Image" Datatype in CF5 Some of my code... <cfset path = "d:\temp\"> <cfset thisfilename = path & "id_" & getBinaryData.objectID & "-" & getBinaryData.uuid & "." & getBinaryData.dataExtension > <cfset tobin = tobinary(getBinaryData.base64String)> <cfif fileexists(thisfilename)> <cffile action="DELETE" file="#thisfilename#"> </cfif> <cffile action="WRITE" file="#thisfilename#" output="#tobin#" addnewline="No"> <cfset contenttype = "image/" & getBinaryData.dataExtension > <cfcontent file="#thisfilename#" type="#contenttype#"> I also do the upload of theimage to sql via cf... However I store the data in base64 (string) in an text field. That is why I do the tobinary() function on the way out. I am still waiting for raw data streaming like php in cf. in php you can do this without writing a temp file. Gl, Alexander Sicular Chief Technology Architect Neurological Institute of New York Columbia University as867 [at] columbia {dot} edu |-----Original Message----- |From: Ben Koshy [mailto:[EMAIL PROTECTED]] |Sent: Monday, October 07, 2002 2:24 PM |To: CF-Talk |Subject: Saving an "Image" Datatype in CF5 | | |I've got JPEG images being saved right in the SQL 2000 |Database as an "Image" Datatype... and I'm wondering how I get |Cold Fusion to read this data and save it to a file? I tried |a simple CFFILE action="write" to write out that field but |that didn't seem to work. I'm using CF5 btw. | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

