> #ExpandPath('/images/consumer/#Cnsmr_ProductIMAGE#' )# > > because you have / in front of images CF assumes you are referencing > the path from WEB ROOT, not from current template path - hence it > looks in C:\ColdFusion8\wwwroot\images instead of in > C:\ColdFusion8\wwwroot\e-dang\images > > try this instead: > > #ExpandPath('images/consumer/' & Cnsmr_ProductIMAGE)# > or > #ExpandPath('/e-dang/images/consumer/' & Cnsmr_ProductIMAGE)# > > > Azadi Saryev > Sabai-dee.com > http://www.sabai-dee.com/ > > > > Fawzi Amadu wrote: > > I have my images for my project under the webroot folder in the > e-dang folder under the image folder and in the consumer folder i.e. > (wwwroot/e-dang/images/comsumer). > > > > But when I reference the file within my code (below), I realize in > the error report that the path returned by coldfusion is missing the > project folder name. Is this usual or does it mean that I got the > referencing wrong? > > > > Here is a portion of the error report (NOTE - e-dang is missing from > the image path): > > > > An exception occurred while trying to read the image. > > > > File C:\ColdFusion8\wwwroot\images\consumer\DSC_0515_thumb.jpg does > not exist. > > > > The error occurred in > C:\ColdFusion8\wwwroot\e-dang\process_simpleSearchResults.cfm: line > 53 > > > > > > Here is the code: > > > > <td width="10%"><!--- creating a resized version of uploaded image > of product. ---> > > <cfimage source="#ExpandPath('/images/consumer/#Cnsmr_ProductIMAGE#' > )#" action="resize" width="100" height="60" name="resizedImg" format= > "jpg"> > > <cfimage source="#resizedImg#" action="writeToBrowser"><!---img > src="images/consumer/#Cnsmr_ProductIMAGE#"---></font></td> > > <td width="90%"><font size="+2">#Cnsmr_ProductDESCRIPTION# > </font> <font size="+2"><a href="showProductDetail. cfm?Cnsmr_Produ> ctID=#URLEncodedFormat(TRIM(Cnsmr_ProductID))#">#Cnsmr_ProductMODELNo# > </font> </a> > > <font size="+2">#Cnsmr_ProductMODELYEAR# > </font> <font size="+2">#Cnsmr_ProductPRICE#</font> <font > size="+2">#User_id#</font> > > > > > > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321817 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4