Hi all, We tried Ben's solution and experienced -exactly- the same problems. The same images were getting cutoff at the same points as under our code.
We realized that CF was truncating the images at 64,000 bytes. We've fixed the issue by increasing the 'Blob Buffer(bytes)' in the advanced part of the CF datasource setup from 64000 to 128000. Ben...thanks for the code...Although it wasn't the solution, it helped us figure out where the issue lay. DHS -- David Hind-Smith | president ___________________________________ ://hind-smith.com -----Original Message----- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 14, 2007 12:50 PM To: CF-Newbie Subject: RE: Displaying images issues David, If you are using MX7, try this. Create a page that looks something like: <cfquery name="getEngImg" datasource="AODDV"> SELECT Image, FileName FROM DocVault WHERE DocVault_Rec = #URL.value# </cfquery> <cfheader name="content-disposition" value="inline" /> <cfcontent type="image/*" variable="#getEngImg.Image#" /> Then, call this poage directly with "value" in the URL for the first query. This will basically stream the image directly to the browser rather than writing it to a file. If that works, we are somewhere... If that does not work, then maybe the binary data is corrupted on input to DB? IF you are NOT MX 7, this will break. ....................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -----Original Message----- From: David Hind-Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 14, 2007 12:18 PM To: CF-Newbie Subject: RE: Displaying images issues Image being left on the server in the folder They are not being deleted... they are being overwritten If you access broken image directly it is still broken -----Original Message----- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 14, 2007 12:19 PM To: CF-Newbie Subject: RE: Displaying images issues Are you deleting the image after it is displayed? Or do you overwrite it each time or what? What happens if you try to access the broken image directly in the URL? ......................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -----Original Message----- From: David Hind-Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 14, 2007 12:11 PM To: CF-Newbie Subject: RE: Displaying images issues Hi Ben, They are written out to a file and then the IMG Src points to that file. I will attach code. ***This is the code that Fetches the Record containing the data that needs to be written out. <cfquery name="getEngImg" datasource="AODDV"> SELECT Image, FileName FROM DocVault WHERE DocVault_Rec = #DocDetails.E_DocVaultRec# </cfquery> *** This writes the image out <CFFILE action="WRITE" file="#GetDirectoryFromPath(GetCurrentTemplatePath())# GI\#SESSION.auth.CompanyRec#_#getengimg.filename#" output="#toBinary(getEngImg.Image)#" addnewline="No" > *** This Displays the Image <img src="GI/<cfoutput>#SESSION.auth.CompanyRec#_#getEngImg.FileName#</cfoutp ut>" > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2559 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
