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...
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.
Copy link to clipboard
Copied
Thank you! I saw what the issue was by doing the cfdump..