I'm having trouble uploading multiple image files to my server, and here's my hangup. I have the following on my
1st page:
<cfform action="thanks-test.cfm" method="post" enctype="multipart/form-data">
<input type="file" size="25" name="pic1"><br>
<input type="file" size="25" name="pic2"><br>
<input type="file" size="25" name="pic3"><br>
<input type="file" size="25" name="pic4"><br>
<input type="file" size="25" name="pic5">
<p>
<input type="submit" name="submit" value="Submit">
</cfform>
Pretty basic, right? Well, this is my code on the following page for the 1st image (the other 4 images are the same):
<cfif #form.pic1# is not "">
<cffile destination="PATH" action="upload" nameconflict="overwrite" filefield="pic1">
</cfif>
Also basic. Say for example I upload 1 image and leave the other 4 blank. This works fine on every browser except for IE 5.1 on the Mac. Apparently, when the files are uploaded to the server, they are assigned a temporary name. Well, IE on the Mac is the only browser that thinks the temporary name is a file name. "pic2" therefore passes the validation and tries to upload a blank field even if nothing has been entered. Does this make sense?!?! What else can I do to make sure this works? Thanks.
1st page:
<cfform action="thanks-test.cfm" method="post" enctype="multipart/form-data">
<input type="file" size="25" name="pic1"><br>
<input type="file" size="25" name="pic2"><br>
<input type="file" size="25" name="pic3"><br>
<input type="file" size="25" name="pic4"><br>
<input type="file" size="25" name="pic5">
<p>
<input type="submit" name="submit" value="Submit">
</cfform>
Pretty basic, right? Well, this is my code on the following page for the 1st image (the other 4 images are the same):
<cfif #form.pic1# is not "">
<cffile destination="PATH" action="upload" nameconflict="overwrite" filefield="pic1">
</cfif>
Also basic. Say for example I upload 1 image and leave the other 4 blank. This works fine on every browser except for IE 5.1 on the Mac. Apparently, when the files are uploaded to the server, they are assigned a temporary name. Well, IE on the Mac is the only browser that thinks the temporary name is a file name. "pic2" therefore passes the validation and tries to upload a blank field even if nothing has been entered. Does this make sense?!?! What else can I do to make sure this works? Thanks.