Ali,
Just upload the image as usual to whatever directory you'll be using. If it's
multiple images with multiple <cffile>'s, and you're using MX7, use the result
attribute which lets you specify your own variable name for each image.
result="file1.serverfile"
result="file2.serverfile"
etc..
Once you have that, you have the image name you can insert into your db.
Just run those in your insert statements.
INSERT INTO tblproducts (image1) VALUES ('#file1.serverfile#')
also, look into ExpandPath(). It's your friend. It'll create your full path
needed in <cffile> destination attribute.
<cffile action="upload" destination="#ExpandPath("/Images")#" more attributes
here>
This will let your cffile send the file to the correct directory whether on
your local machine, or a remote server.In this case, the images folder in your
site root.
hth,
Will
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7.
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277076
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4