• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Photo Application

New Here ,
Oct 07, 2006 Oct 07, 2006

Copy link to clipboard

Copied

Hi,

I'm currently writting a small content managed system for photographs.

I want my family to be able to upload photographs then have other people view them in a browser.

I only want my family to be able to view these photos, so I'm going to get them to login before they can see any pictures and for added security will store the photos outside of the wwwroot.

I have written the code that will upload the photos and resize them to a decent size, but I am having trouble displaying them in the desired format of: the image then below that a title and a litte discription of the image - this textual data is stored in a database.

The problem is that since the photos are stored outside of the wwwroot, I can't use the <img> tag to display the photo in the webpage. I was trying to use <cfcontent>, but when I do that, then the title and description don't show up - only the image appears.

Does anyone know of a way that I can get both my text and photo to show up on the same webpage?

Thanks, Paul.
TOPICS
Advanced techniques

Views

315

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

correct answers 1 Correct answer

Guide , Oct 07, 2006 Oct 07, 2006
There are pros/cons but you can combine <img> with cfcontent.
http://cfdj.sys-con.com/read/41789.htm

Votes

Translate

Translate
Guide ,
Oct 07, 2006 Oct 07, 2006

Copy link to clipboard

Copied

There are pros/cons but you can combine <img> with cfcontent.
http://cfdj.sys-con.com/read/41789.htm

Votes

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
New Here ,
Oct 07, 2006 Oct 07, 2006

Copy link to clipboard

Copied

Thanks for your reply - That is exactly what I want to do and it works great.

The only problem is that it only works for GIF files and all my families digital cameras take photos in JPG format.

Is there anything simiar that works for JPG or does anyone know of a free script that can automaticly convert a JPG image to GIF?

Thanks, Paul.

Votes

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
Guide ,
Oct 07, 2006 Oct 07, 2006

Copy link to clipboard

Copied

Just change the mime type. I think its ...
<cfcontent file="c:\folderOutsideWebRoot\yourImageFile.jpg" type="image/jpeg" deletefile="no">

If you're familiar with udf's you might also check out
getFileMimeType(filePath)
http://www.cflib.org/udf.cfm?ID=1229




Votes

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
New Here ,
Oct 08, 2006 Oct 08, 2006

Copy link to clipboard

Copied

LATEST
quote:

Originally posted by: cf_dev2
Just change the mime type. I think its ...
<cfcontent file="c:\folderOutsideWebRoot\yourImageFile.jpg" type="image/jpeg" deletefile="no">



I tried that last night and it didn't work. Tried it again this morning and it worked a treat. Must have been getting tired yesteray!

Thanks again for your help. This is just what I wanted to achieve.

Paul.

Votes

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
Resources
Documentation