|
Table Of Contents
|
CF_FileManager Custom Actions & ParametersPassing Custom AttributesYou can pass custom attributes to the component by editing the file : inc_customAttributes.cfm in the root folder. To declare a custom attribute in this file, simply CFPARAM it as follows: <cfparam name="attributes.myDatasource" default="myDatasource"> You can now use this variable in any of the action pages of CF_FileManager. Custom Attributes are useful when you need to store information in a database after a certain action has occurred e.g: When a file is uploaded and you need to store the file name in a database. Custom Post-Upload ProcessingCF_FileManager allows you to perform custom processing on the files upload after a multi-upload operation. You can perform your custom post-upload operations by editing the file "dccom/components/dcFileManager3/action/act_customAfterUploadProcessing.cfm" As each file is uploaded, the file details are added to a Struct() called uploadedFiles. The struct contains all the normal CFFILE ACTION="UPLOAD" variables aswell as some custom values set by CF_FileManager. The uploadedFiles struct is a struct of structs with each KEY called Filen where n is the number of the file you wish to query. For example, to get at the file size of the third file uploaded, you could use <cfset currentFile=uploadedFiles["File3"].fileSize> The following are a list of the keys contained in each files entry.
Be careful that you CFTRY/CFCATCH your code in this file. Please view Page 2 for example code for traversing the struct. Custom Double Click ActionsYou can tell CF_FileManager to perform a certain operation on certain files when the file is double clicked. For example, you could set all files to download when double clicked on, edit text files when double clicked on or even view images when double clicked on. To use the custom double-click actions, a number of parameters must be passed to CF_FileManager. <cfparam name="attributes.dblClick_extensions" default=""> dblClick_extensionsThis parameter takes a comma-delimited list of extensions that tell CF_FileManager to perform some action (described in dblClick_actions) on files with that extension. An example of this attribute would be dblClick_extensions="txt,ini,jpg" You can also use the value ALL to perform the double-click action on all files, regardless of the extension. dblClick_actionsThis parameter takes a comma-delimited list of actions telling the component what ColdFusion file is to be called for the specified extension at the same list index as described in dblClick_extensions. The ColdFusion file specified should be placed in the "dccom/components/dcFileManagerV3/action/customActions/" folder. An example of this attribute would be dblClick_actions="cust_dblClickEditText.cfm,cust_dblClickEditText.cfm,cust_dblClickViewImage.cfm" dblClick_targetsThis parameter takes a comma-delimited list of targets (popup or iframe) telling the component in what manner to perform the action for the specified exetension at the same list index as described in dblClick_actions Valid entries are:
Example Double Click CodeExample 1: <CF_DCCOM component="dcFileManagerv3" Example 2: <CF_DCCOM component="dcFileManagerv3" |