Serve Create image through IMG


/ Published in: ColdFusion
Save to your folder(s)



Copy this code and paste it in your HTML
  1. This takes an image that was created, shows it and deletes it. This is good for captcha images since you dont want to keep them arround after they are created.
  2.  
  3. -------------------------
  4. <img src="/blog/serveCaptcha.cfm?captchaImage=<cfoutput>#captcha.image#</cfoutput>" border=1>
  5.  
  6. -------------------------
  7. This page feeds back the image and deletes it after
  8.  
  9. <cfparam name="captchaImage">
  10. <cfcontent deletefile="yes" file="#application.blogcfm.captchaImageRoot##application.blogcfm.dirsep##captchaImage#" type="image/x-png">

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.