|
ColdFusion Home
Basic ColdFusionIntroductionColdFusion Installation ColdFusion Editors ColdFusion Syntax ColdFusion Includes ColdFusion Variables ColdFusion Variable Types ColdFusion If Statements ColdFusion Loops ColdFusion Datasource ColdFusion Database Queries ColdFusion Lists ColdFusion Arrays ColdFusion Redirect ColdFusion Debugging ColdFusion Error Handling Advanced ColdFusionColdFusion MailColdFusion Functions ColdFusion Components ColdFusion Web Services ColdFusion Upload File ColdFusion Read File ColdFusion Write File ColdFusion Append File ColdFusion Rename File ColdFusion Copy File ColdFusion Move File ColdFusion Delete File Cffile Parameters Using cffile Parameters ColdFusion FTP (cfftp) cfftp Cached Connections ColdFusion HTTP (cfhttp) ColdFusion Query of Queries ColdFusion Charts ColdFusion Summary ColdFusion AdminCF AdministratorCF Archive and Deploy CF Scheduled Tasks CF Mini Tutorial ColdFusion BooksColdFusion MX BibleMacromedia ColdFusion MX 7 Web Application Construction Kit Got a MySpace Page?Get "www.yourname.com" for your MySpace page. Learn how >>. |
Using cffile ParametersThe previous lesson showed the parameters that are available to developers when the These parameters are available in the 'file' scope and can be used in a number of ways. One common technique is to insert some/all of these parameters into a database. If you do this, later on you can use the database to lookup the details of any file that has been uploaded to the server. This can be useful if you want to dynamically render details about the file to the user. For example, you could use the 'serverFileExt' parameter to display the appropriate icon (i.e. Word icon, PDF icon etc). You could also use the 'fileSize' parameter to display the file size to the user. This is good usability practice - especially if the file is large. You could even create an image library for users to browse images and view their details if you wish. In the following example, I have modified the code from the file upload lesson so that we are now inserting details about the file into a database. This, of course, assumes you have a database configured with the appropriate datasource/tables/columns etc
Enjoy this website?
Oh, and thank you for supporting Quackit! |
Featured Template:
(Build your websites in minutes!) |