File uploading seems to be very basic feature that of every web application. Coldfusion offers very easy way for uploading file on the server. Single tag “cffile” for multiple needs.
<cffile action=”upload” destination=”c:\temp\” nameConflict=”overwrite” fileField=”Form.FiletoUpload”>
-Specify different values for it in this case upload
-Where your file will get saved.
-This attributes tell the coldfusion when file is available on server. Should it be overwrite, skip, or need to create with new name
-Name of the files that has to be uploaded.
Also in html form part, you need to define form enctype=”multipart/form-data”. This tell coldfusion that file has been submitted by web browser.
-Create html form for file uploading
-Create cfm page for your coldfusion scripting
-Check wheater form has been submitted or not
-Submitted then run the cffile tag