[ColdBox 3.7.0] Return image to browser from event

Hi all,

I have an event that dynamically creates an image based on values contained in the rc.So the URL could look like

http://www.domain.com/width/600/height/400

Is there an easy way to return just the image to the browser from the event? Just as if you went directly to the image URL

http://www.domain.com/images/600x400.png

I may be over-thinking this and missing the obvious.

Thanks,

Richard

cfcontent should work nicely. Of course, check out the FileUtils.cfc in coldbox/system/core/utils. It has a handy sendFile method that the CFContentMeeiaProvider uses in ContentBox that basically does everything you need.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I tried the FileUtils plugin initially but missed off the disposition parameter which meant it forced the image to download, changing this to inline, it now does exactly what I want.

Thanks,

Richard