hi guys and trying to use the ImageCFC component created by Rick Root in my
flex app to crop the uploaded image but nothing seems to be happening... please
help me. here is my upload.cfm i use for the upload.
"upload.cfm"
<!---
Flex Multi-File Upload Server Side File Handler
===============================================
This file is where the upload action from the Flex Multi-File Upload UI
points.
This is the server side half of the upload process.
--->
<!--- set the full path to the images folder --->
<cfset mediapath = expandpath('/imagecfcUploader/src/imgs')>
<cftry>
<!---
Flash uploads all files with a binary mime type
("application/ocet-stream"), so we
cannot set cffile to accept specfic mime types. The workaround
is to check the file
type after it arrives on the server and if it is not
desireable, delete it.
--->
<cffile action="upload"
filefield="filedata"
destination="#MediaPath#"
nameconflict="makeunique"
accept="application/octet-stream"/>
<!--- Begin checking the file extension of uploaded files --->
<cfset acceptedFileExtensions = "jpg,jpeg,gif,png"/>
<cfset filecheck =
listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
<!--- read the image ---->
<cfimage name="uploadedImage"
source="#MediaPath#/#file.serverFile#" >
<!--- Invoke image.cfc component --->
<cfset imageCFC = createObject("component","image") />
<cfset imgInfo = imageCFC.crop("", "#MediaPath#\#uploadedImage#",
"#MediaPath#\#uploadedImage#",1,1,300,300,80)>
<cfcatch type="any">
<!--- use cfthrow to get onError in Application.cfc to handle
the error --->
<cfthrow object="#cfcatch#">
</cfcatch>
</cftry>