|
Table Of Contents
|
CF_ProFlashUpload Processing Uploaded FilesPerforming custom processing on the uploaded fileUse the attribute includeOnUpload to pass the name of a file that will process the uploaded file. Example: <cf_dccom component="ProFlashUpload" includeOnUpload="inc_resizeImages.cfm" ...> In this example the "inc_resizeImages.cfm" should be in the same folder that holds the dccom directory. You could check the file extension at this point: <cfif ListLast( File.ServerFile, "." ) EQ "jpg"> <!---- RESIZE THIS JPEG ---> </cfif>
Passing Your Own AttributesAll attributes you pass when calling ProFlashUpload are your include file. e.g. If you pass a custom attributes folderId like so: <cf_dccom component="ProFlashUpload" folderId="#URL.folderId#"...> Then ATTRIBUTES.folderId is available to your include file! Handling ErrorsNo doubt you will at some stage have errors in your processing template file. Getting the names of uploaded files for additional processingThis was requested so often that we made if a part of the component! Just pass the attribute fileListVariable and the list of uploaded files will be store in SESSION[fileListVariable]. Example: <cf_dccom component="ProFlashUpload" fileListVariable="uploadedFiles" ...> Then when the component is finished uploading, the list of files is stored in SESSION.uploadedFiles. Examples
|