Hi,
I have this code that upload just one image to my folder.
how can I have four image upload at the same time.
Here's what I have.
<cfif IsDefined('FORM.upload_button')>
<!--- upload to current directory by default --->
<cfset targetDirectory = ExpandPath('.')&"\LoadImages\">
<cffile nameconflict="overwrite" action="upload"
destination="#targetDirectory#"
filefield="FORM.upload_file" />
<cfset pathToFile = targetDirectory &"/"& CFFILE.serverFile>
<cfoutput>
image #CFFILE.serverFile# <img src="LoadImages/#CFFILE.serverFile#">
</cfoutput>
</cfif>
<form name="RTEDemo" action="PostAd.cfm?ChID=1" method="post" onSubmit="return submitForm();" enctype="multipart/form-data">
<input type="file" name="upload_file"/>
<input type="submit" name="upload_button" value="Upload"/>
</form>
I know that I have to add three more input type file but what should I name them?
exp:
<input type="file" name="upload_file1"/>
<input type="file" name="upload_file2"/>
<input type="file" name="upload_file3"/>
now that I have three different upload name I have to change my code?
Thanks,
ASKER
I tried this link
http://www.bennadel.com/blog/1117-Ask-Ben-Uploading-Multiple-Files-Using-ColdFusion.htm
but I am getting an error that says Object require.