Okay, what you need to do is to check to see that the file#i# exists.
You can do this by checking the form field first to see if it has
content, but you should probably check that the file exists anyway,
just in case the upload failed for some reason.
Something like:
<cfloop from="1" to="3" index="i">
<cfif len(trim(form["file#i#"])) gt 0>
<cfif
fileexists("#ExpandPath('users/uploads/')##cffile['file'&i].serverFile#")>
.....
[do your stuff here]
.....
</cfif>
</cfif>
<cfloop>
> Thanks Kris, the solution for the IsPrimary issue works well.
>
> I'm not sure I follow you on the first issue. If I only fill out the first
> upload field, I get an error stating, "The form field 'file2' did not contain
> a file."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271147
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4