What is this Tag?
CF_MultiUpload allows a developer to easily embed a multiple file upload control in their application allowing users the ability to select and upload multiple files to the target server.
Due to normal browser restictions, you cant easily present a user friendly upload screen without pre-determining how many files are going to be uploaded.
CF_MultiUpload provides a unique interface to allow an unlimited number of files to be uploaded in one batch overcoming this limitation.
If the advanced upload is enabled CTRL and SHIFT keys can be used to select many files at once. The Advanced Upload requires the installation of an ActiveX control on the clients machine. CF_MultiUpload will detect if the ActiveX control is installed and if not, prompt the user to install MultiUpload.exe which is downloaded automatically.
To make the installation of the ActiveX control as seemless as possible, we have taken the same steps Google use with their Toolbar Plug-In. This means no permission problems, no security warnings for your users, just 3 simple steps 1) download, 2) install and 3) run!
The control requires only one line of code to integrate with an existing application and support multiple file uploads in Mozilla 1.3a+, Netscape 7.1+ and Internet Explorer 6+ (Advanced Upload requires IE on Windows)
It is built around the DCCOM component architecture for security, scalability and ease of use for the developer.
Features:
- Ability to select files using CTRL and SHIFT Keys
- Upload progress bar
- Specify types of files allowed in the upload
- Specify allowed MIME Types
- Show/Hide the Basic Control or the Advanced Control
- Customise the look and feel easily
- Automatically upload a set of files on page load
- new - Returns a structure of all files uploaded holding file information
- new - Pass custom attributes
- new - Custom After Upload Processing Page (Resize Images, store info in database)
- new - Save filenames in database
- Specify name conflict attribute
- Pre load the control with specific files on the client machine
- Small download and easy installation
- Many more useful features. Please email dan@digital-crew.com with any queries!
Demo
NOTE: The demo uses a JS Prompt when files are uploaded. This can be customised to a different type of alert or action by you.
To Add another file to the upload list, hit the Browse button or use the Advanced Upload control to select files using SHIFT and CTRL keys
To see the power and features of CF_MultiUpload, please check out our demo here
How to use the Tag:
<CF_DCCOM component="multipleFileUploadControlX" folder="c:uploads">
</CF_DCCOM>
Advanced File Upload (ActiveX Control):
To provide a means of selecting multiple files using the CTRL or SHIFT key, we have included the Advanced File Upload Component.
This component is a safe ActiveX Control that needs to be downloaded and installed on the client machine.
If the ActiveX control is not installed on the users machine, they will be prompted to download and run setup.exe. This download is directly from our server so we can keep the ActiveX Control up-to-date.
Variables Returned After Upload Per File:
After the upload processing is complete, the following Struct() is available : uploadedFiles
This contains the following variables per file :
| attemptedServerFile |
| - Initial name ColdFusion used when attempting to save a file |
| clientDirectory |
| - Directory location of the file uploaded from the client's system |
| clientFile |
| - Name of the file uploaded from the client's system |
| clientFileExt |
| - Extension of the uploaded file on the client system (without a period) |
| clientFileName |
| - Name of the uploaded file on the client system (without an extension) |
| contentSubType |
| - MIME content subtype of the saved file |
| contentType |
| - MIME content type of the saved file |
| dateLastAccessed |
| - Date and time the uploaded file was last accessed |
| fileExisted |
| - Whether the file already existed with the same path (Yes or No) |
| fileSize |
| - Size of the uploaded file |
| fileWasAppended |
| - Whether ColdFusion appended uploaded file to a file (Yes or No) | |
| fileWasOverwritten |
| - Whether ColdFusion overwrote a file (Yes or No) |
| fileWasRenamed |
| - Whether uploaded file renamed to avoid a name conflict (Yes or No) |
| fileWasSaved |
| - Whether ColdFusion saves a file (Yes or No) |
| oldFileSize |
| - Size of a file that was overwritten in the file upload operation |
| serverDirectory |
| - Directory of the file saved on the server |
| serverFile |
| - Filename of the file saved on the server |
| serverFileExt |
| - Extension of the uploaded file on the server (without a period) |
| serverFileName |
| - Name of the uploaded file on the server (without an extension) |
| timeCreated |
| - Time the uploaded file was created |
| timeLastModified |
| - Date and time of the last modification to the uploaded file | | Frequently Asked Questions:
Q - Can I select multiple files by not clicking browse everytime but by using CTRL or SHIFT on the file select dialog box? A - Yes. using the Advanced Upload Control, you can select multiple files using CTRL and SHIFT keys
Q - Can I supply a list of files and have them automatically uploaded?
A - Yes. using the Advanced Upload Control, you can supply a list of files and have them uploaded automatically when the page loads. (New to Version 1.95)
Have you got questions whether this is the tag for you?
If you are unsure if CF_MultiUploadAdvanced is the tag for you, please feel free to contact me either by email or by clicking the LIVE Chat icon.
Partial list of Tag Attributes:
| WIDTH |
Width of control |
| HEIGHT |
Height of control |
| STYLE |
Style of component |
| FOLDER * |
Target upload folder |
| NAMECONFLICT |
Upload name conflict parameter |
| UPLOADACCEPT |
List of accepted MIME types |
| TIP |
Text to appear to the left of the browse button |
| FRAMETITLE |
Text to appear on the container field set |
| SHOWADVANCEDUPLOAD |
Show the advanced upload option (default is yes) |
| FILTER |
File filter to use with advanced uploader (default is *.*) |
| FILTERNAME |
Optional. A name for the filter list e.g. "All Image Files" |
| SELECTEDFILES |
Optional. A comma delimted list of files to pre-load the control with |
| SHOWBASICCONTROL |
Optional. Ability to hide the basic DHTML upload control and only show the Advanced |
| ADVANCEDUPLOADBUTTONTEXT |
Optional. Text to appear on the Advanced Upload Button |
| ADVANCEDUPLOADBUTTONSTYLE |
Optional. CSS Style to be applied to the Advanced Upload Button |
| AUTOUPLOAD (Yes|No) |
Optional. Automatically upload list of files on page load | * = Required
Installation Guide:
The installation of CF_MultiUpload Advanced is very straight forward.
1) Unzip the contents of the ZIP file to the location you wish to run the tag from
e.g: c:inetpubwwwrootmy app
You should now have a folder structure as follows:
c:inetpubwwwrootmy appdccom [Sub Folders and Files] c:inetpubwwwrootmy appdccom.cfm c:inetpubwwwrootmy appapplication.cfm
2) You can now call the component from any Coldfusion Page using:
<CF_DCCOM component="multipleFileUploadControlX" folder="c:uploads">
</CF_DCCOM>
|