Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

working with images in coldfusion

Status
Not open for further replies.

critical5

Programmer
Dec 13, 2006
37
0
0
GB
Hi there, I've tried googling this but no results.

Here is what I need to get properties from a database and display them with their pictures.(gallery) I know storing pictures in the database is not good performance wise. Has anyone have any tips on how to do this in coldfusion?

Thanks

 
save the file name in the database as a text field and store the image in a folder. The folder can be in or out of the webspace. The only difference is how you would reference it.

in the webspace might look like <img src = "/images/#query.imageName#">

outside of the webspace you would use cfcontent to retrieve the file.
livedocs said:
<!--- CFCONTENT Example 1
This example shows the use of cfcontent to return the contents of the CF
Documentation page dynamically to the browser. You might need to change the
path and/or drive letter depending on how ColdFusion is installed on your
system. Notice that the graphics do not display and the hyperlinks do not work,
because the html page uses relative filename references.
The root of the reference is the ColdFusion page, not the location of the
html page. --->

<cfcontent type = "text/html"
file = "C:\CFusionMX7\deleteFile = "no">
 
I have managed to do this and displays one image.But how can I display more than one image on for say one property. Do i need more than one directory(in the webspace)
Please give me more details and examples. I have never done anything like this before.
 
I'm not going to do the work for you but have you looked at <cfloop>?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top