That did the trick. thanks a lot. Gav
----- Original Message ----- From: <[EMAIL PROTECTED]> To: "CFAussie Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, December 09, 2003 4:11 PM Subject: [cfaussie] Re: cfhttp/ cffile for images > On Tue, Dec 09, 2003 at 03:27:15PM +1100, Gavin Cooney wrote: > > > I'm trying to retrieve a list of images (gifs, jpegs, pngs) from a webserver and save them to my harddrive. At the moment the images, when opened on my hard drive, are black and while fuzz... like a TV station that is not tuned in. > > > > <cfoutput query="ONLINE_QUESTIONS"> > > <cfif len(image_link) gt 0> > > <cfhttp url="#application.online_question_image_location##IMAGE_LINK#"> > > </cfhttp> > > <p><strong>Getting:</strong> #application.online_question_image_location##IMAGE_LINK#</p> > > <cffile action="WRITE" output="#cfhttp.fileContent#" file="#MCQ_FOLDER#\images\#IMAGE_LINK#"> > > </cfif> > > </cfoutput> > > > > An example of the image i'm trying to download: > > > Should I add a character set? or is there something else i should do when using CFFILE to write images? > > 1) remove the cffile > 2) change the <cfhttp to something like: > > <cfhttp url="#application.online_question_image_location##IMAGE_LINK#" > method="get" path=""#MCQ_FOLDER#\images\"> > > 3) while you're at it, change the <cfoutput to a <cfloop, since you're > not outputting anything. > > > I tried this with the file you specified & it downloaded onto my test > server with no problems. > > Cheers > > Paul Haddon > Technical Services Manager > Formstar Print Technologies > > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > http://www.mxdu.com/ + 24-25 February, 2004 > --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
