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

Saving displayed image on a form

New Here ,
Dec 20, 2006 Dec 20, 2006

Copy link to clipboard

Copied

Hi, currently, I display images on my form using '<img src="getPhoto.cfm?name=John />'. getPhoto calls a stored procedure to get photo. When the user clicks the save button on the form, I'd like to save the photo to my personal database. Is there a way to somehow get the displayed image binary code ? I don't want to make another call to that stored procedure to get binary and save to db.

Thanks so much,
C
TOPICS
Advanced techniques

Views

191

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
LEGEND ,
Dec 20, 2006 Dec 20, 2006

Copy link to clipboard

Copied

Is there a way to somehow get the displayed
image binary code ?

Not through the form. You could use JS to get the image name and pass
that through a hidden field, but for the binary you will need to read
the image file on the server with <cffile...>.

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 ,
Dec 20, 2006 Dec 20, 2006

Copy link to clipboard

Copied

LATEST
Thank you for your reply Ian, I was thinking about setting an img id (<img id="pic" src="getPhoto.cfm?name=John />) and then in my action page, I would do something like 'FORM.pic' but I guess that wouldn't work.

Thanks again,
C

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