Carl, the way you're doing it is for a single file at a time. Not that there's anything wrong with that, but if your user has lots of files to upload you'll need to let them have more.
But if you run a template with a capacity for 5 uploads, and the user only uploads 3, you'll get errors and/or you'll only see the last file uploaded. Thats why you have to loop over the filenames, giving them unique variable names, and only doing it for the number of files being uploaded. Furthermore, if you hard code it as file1, file2, file3 etc, and the user uploads using the second and third upload field on the form, you'll get an error straight away when the action page looks for file1. Look at the tutorial I put on my site for just this situation. http://afpwebworks.com/index.cfm?fuseaction=DisplayDocument&DocumentID=48 Try it that way first, so you can see what does what, then move the functionality into a CFC. To include the processing in a CFC you dont have to make many changes, and Steve spelled that all out for you. Cheers Mike Kear Windsor, NSW, Australia AFP Webworks http://afpwebworks.com .com,.net,.org domains from AUD$20/Year On Thu, 04 Nov 2004 15:17:48 +1100, Carl <[EMAIL PROTECTED]> wrote: > Thanks for that, but how do you call the files using this way normall I > would use CFFILE.SERVERFILE? since they are whatever.tmp? and that's > what goes into the database blahblah.tmp? Where as b4 if I only had one > file it way easy to do, I did this code below... > > Set > <cffile....> > <cfset attachment = CFFILE.SERVERFILE> > > and Call or insert it later > #attachment# > > > > > Thanks > > Carl > --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
