Hi, I have following code on my website, which resize and rename the image and upload to the Images folder. It works fine on old web server, but stop working on new server. It gives this error I have following code:- <cfset Image1 = createuuid()> <cfset Image1 = #Image1# & ".jpg"> <cffile action="upload" filefield="file" destination="#imageFolderPath#" nameconflict="MakeUnique" accept="image/*"> <cffile action="rename" source="#imageFolderPath#/#cffile.ServerFile#" destination="#imageFolderPath#/#Image1#"> <!--- create the object ---> <cfset myImage = CreateObject("Component","Image") /> <cfset myImage = CreateObject('Component', 'Image').setKey('68DPN-P2M2E-X8CRC-7DBVA-RXXB0') /> <!--- open the image to resize ---> <cfset myImage.readImage(imageFolderPath & Image1) /> <cfset width = myImage.getWidth() /> <cfif width gt 740> <!--- resize the image proportionally on the width ---> <cfset myImage.scaleWidth(740) /> </cfif> <cfset height = myImage.getHeight() /> <cfif height gt 520> <!--- resize the image proportionally on the height ---> <cfset myImage.scaleHeight(520) /> </cfif> <!--- output the image in JPG format ---> <cfset myImage.writeImage(imageFolderPathE & 'A' & Image1, "jpg") /> Code (markup): Thanks for Help
Without knowing anything about your paths or mappings, the error suggests a missing mapping. If you have upgraded versions ie 6/7 to CF8, also check into reserved words. I'm not sure if "Image" is one ...
I have searched, and there is no Image.cfc present. Then i have searched the backup files (from old server) and i could not find either. I am sure the developer didn't use the Image.cfc file on old server. Any way how to program it where i need to place. can you help bacause every page with Image upload produce the same error. Please help.
Your code suggests otherwise. AFAIK, createObject("component", ....) can only be used to create a CFC. In which case somewhere in the standard CF paths _is_ an Image.cfc. Where it's located (subfolder, custom tag folder or somewhere else...) I couldn't say. It sounds a bit like the Alagad Image.cfc which is typically stored in one of the custom tag folders , where most people forget to look.. (See CF Admin for your custom tag paths ...) http://www.alagad.com/projects.imageComponent