Created
April 3, 2014 21:00
-
-
Save tpatch/9962842 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset var image = "" /> | |
<cfset var jFile = "" /> | |
<cfset var pathImage = ExpandPath(arguments.FilePath & "/image.jpg") /> | |
<cffile action="upload" destination="#GetTempDirectory()#" fileField="#arguments.File#" nameconflict="overwrite" /> | |
<cfscript> | |
image = ImageRead(cffile.SERVERDIRECTORY & "/" & cffile.SERVERFILE); | |
if (isImage(image)) { | |
imageResize(image, "500", ""); | |
imageWrite(image, pathImage, 1); | |
} | |
jFile = createobject("java", "java.io.File").init(cffile.SERVERDIRECTORY & "/" & cffile.SERVERFILE); | |
jFile.delete(); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment