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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output Images (jpeg's)

Status
Not open for further replies.

lathodio

Programmer
Joined
Mar 25, 2000
Messages
9
Location
SI
I am trying to output jpegs to a table that is stored in a directory, how do I dynamically out put them so when I add mor pics to the directory it is automatically outputed to the table? Is this a database function or some other CF function?

Thanks
 
There's a CF tag called CFDIRECTORY which allows you to perform directory-related actions.

Try this which will create a query result called JpegFiles with columns (Name, Size, DateLastModified and others).

<CFDIRECTORY ACTION=&quot;List&quot; DIRECTORY=&quot;c:\jpeglocation&quot;
NAME=&quot;JpegFiles&quot; SORT=&quot;ASC&quot;>

You can now output this on an img tag ... like this.

<CFOUTPUT>
<IMG SRC=&quot;c:\jpeglocation\#JpegFiles.Name#&quot;>
</CFOUTPUT>

Hope this helps.

Klotzki
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top