Wait for create image to complete...
I have an application that uses function in a cfc file. One function creates a jpeg from a byte array. This works fine. However, if I"m updating the image I need Flash to wait for the image to be created before it trys to reload it. How do I modify my code to wait and not do the return until the cffile action is complete?
<!-- save jpeg -->
<cffunction name="createJpeg" access="remote" output="false" returntype="boolean">
<cfargument name="send_image_data" type="string" required="yes">
<cfargument name="send_image_path" type="string" required="yes">
<cfset bindecode = BinaryDecode(send_image_data, "Base64")>
<cfset pathtowrite='#send_image_path#'>
<cffile action="write" file="#pathtowrite#" output="#bindecode#" nameconflict="overwrite" />
<cfreturn "1">
</cffunction>
Thanks!
