troubleshooting Question

Upload four images at the same time.

Avatar of lulu50
lulu50Flag for United States of America asked on
ColdFusion Language
4 Comments1 Solution221 ViewsLast Modified:
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 CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros