|
Table Of Contents
|
Path : Home » ColdFusion Products » File Management » CF_ProFlashUpload » Processing Uploaded Files » Processing Uploads: Image File Resizing Example
ProFlash Upload - Processing Uploads: Image File Resizing Example
In this example we will use ProFlashUpload to upload images to the server and then use a custom include file to perform image resizing on each image after it has been uploaded. In this example, I'm using Rick Roots excellent imageCFC to perform the custom uploading.
Step 1To start with, use the filter option to specify that we only want image files. Also pass the name of your include file: <cf_dccom component="ProFlashUpload" includeOnUpload="inc_resizeImages.cfm" filter="All Images,*.jpg;*.jpeg;*.png;*.gif,All Files,*.*"The inc_resizeImages.cfm should be in the root of your application. Step 2Create the inc_resizeImages.cfm file and copy in the following: <cfset uploadedImageFullFilePath = ATTRIBUTES.folder & File.ServerFile> TipsInclude File LocationYou could pass includeOnUpload="includes/inc_resizeImage.cfm" and the custom processing file would then have to be at "[appRoot]/includes/inc_resizeImages.cfm". |