> Hello all! I am once again in desperate need of a clue and
> hoping someone will be kind enough to send one. I am creating
> a console for my client to add to/edit/delete vehicle listings
> from their database. On the add page, I have a number of fields
> for the pertinent info, and then at the bottom are 5 fields for
> them to upload images of different views of the vehicle (thumbnail,
> front, back, interior, etc...).
>
> I have never used CFFILE before, and I am looking in my books for
> help...the problem is that they all show examples of a single image
> upload, where the image is the only form data. That is, the whole
> purpose of the forms in their examples are to upload a single
> image and nothing more. None address forms where the image is just
> one piece of it, and how you would integrate the CFFILE ACTION in
> with an INSERT. Each example shows a standalone action file with
> more or less just the CFFILE ACTION info on it. What about the rest
> of my form data? I want to use one form and have everything put in
> for the new record. Also, is there a way to have one CFFILE ACTION
> with multiple FILEFIELDS in it? They would all be going to the same
> destination...
Typically, you're going to use CFFILE to write the uploaded file to the
filesystem, and you'd insert your other form fields into the database with
an insert query. You can do both within the same action page. For example,
let's say you wanted to upload your auto info. You might upload one or more
images, write them to the filesystem with CFFILE, reference the server-side
file names into variables, then insert the values of those variables, along
with your other form data, into your database table.
You can't have more than one file uploaded with the same CFFILE tag, but you
can have multiple CFFILE tags referencing multiple uploaded files.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists