It is pretty simple to do. On your <form> tag you need to add 
enctype="multipart/form-data" to be able to upload files to the server, and use 
the type="file" for the input field. On the server side, use the <cffile 
action="upload"> tag to put the file in the directory of your choice. The 
<cffile> tag returns a struct with the status parameters which include the 
filename. You access them by using cffile.clientFile or 
#cffile.clientFileName#.#cffile.clientFileExt#. There are many more parameters 
available besides those, but it is all in the documentation. Just look up 
cffile, there are even some example upload file code there.

CoolJJ

> Hi:
> Do you know any tutorial that teaches me how to make an image upload 
> form that I can use with my "Add Product" page? I need it to be 
> something like the one in cartweaver shopping cart. I mean when you 
> upload the image it is uploaded and the address goes to the database 
> at the same time and the user doesn't have to type the name/address of 
> the image (after uploading it) in another form to insert it into the 
> database.
> In summary I need an upload image form that uploads the image and 
> inserts the name/address of the image into the proper field of the 
> database for the right product.
> Thanks
Benign

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277723
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to