Images not displaying from folder

Explorer ,
Sep 16, 2019 Sep 16, 2019

Copy link to clipboard

Copied

i'm getting no images at all whenever is try to display images to the browser from a folder from my local computer. Below is the code that i'm using:

 

<cfset webpath2 = "C:\ColdFusion2016\cfusion\wwwroot\The_Resolving_Door\photos\#cookie.communityID#\">

<!---the #cookie.communityID# is the name of the folder that matches the ID of the current saved cookie--->

<!---output-images--->

<cfdirectory action="LIST" directory="#getDirectoryFromPath(expandPath('*\photos\#cookie.communityID#\*'))#" filter="*.JPG" name="dir">
<cfloop query="dir">

<cfif dir.type is "file">

<!--- <div> --->

<cfoutput>

<a href="#dir.name#">

   <img src="#dir.name#" width="50">

</a>

</cfoutput>

<!--- </div> --->

</cfif>

</cfloop>

 

Could i be doing something in error as a reason for my images not displaying. The images are in the actual folder but nothing is displaying? Thanks for any insight...

 

 

Views

96

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

Try doing a cfdump of your dir and cookie.communityid variables, to make sure their values are what you are expecting. 


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 21, 2019 Sep 21, 2019

Copy link to clipboard

Copied

LATEST

Thank you! I saw what the issue was by doing the cfdump..

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines