I seem to be having an issue manipulating photos from within my CFC. I get an error that says that it encountered an exception while trying to read the image. So the question is pretty straightforward, are there any issues with manipulating files from within the CFC, rather than the CFM?
<cffunction name="imageResize" access="public" returntype="boolean">
<cfargument name="filename">
<cfset result = "true">
<cfimage
action = "resize"
source = "#root#/documents/uploads/PHOTOS/#filename#"
width = "400px"
height = ""
destination = "#root#/documents/uploads/PHOTOS/thumbs/#filename#"
overwrite = "yes"></cfimage>
<cfreturn result>
</cffunction>
Thanks
There are no issues with having cfimage inside a cfc. It's something I do all the time.
I suspect that the issue you have is that the variable "root" is unknown inside your function. You should probably also var scope your result variable and specify the scope on your use of the filename variable.