Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8799689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:23:30+00:00 2026-06-14T00:23:30+00:00

I have a script which goes through an XML document and extracts the image

  • 0

I have a script which goes through an XML document and extracts the image URLs, and proceeds to download them using CFHTTP as follows:

<cfhttp method="get" url="#qTempImageData.url#" result="oHttp">
    <cfhttpparam type="CGI" name="http_referer" value="http://www.realestate.com.au" encoded="false" /> 
</cfhttp>
<cfimage action="write" destination="#APPLICATION.vTempPath#properties\#ListLast(qTempImageData.url, '/')#" source="#oHttp.FileContent.toByteArray()#" overwrite="yes" />

The problem arises when the URL variable “qTempImageData.url” is something that doesn’t terminate in an image extension like .png or .jpg… for example:

http://img.agentaccount.com/f6ec41e07261cec1b9e120fc0186b1cf7e583d66

This URL does serve the image up and one can see that an image exists, but I am unable to trace it to any URL that would host the file itself, and thus download it as I normally would with the above CFHTTP command…

Is there any way that I can account for “served” images like the one in the URL variable?

~ Eliseo

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:23:31+00:00Added an answer on June 14, 2026 at 12:23 am

    In the case of the URL you list, whatever filename was once associated with the file is gone, so you’ll need to create a new name.

    If your problem is that you need the extension information in order to save and then serve the file, then one approach would be to look at the content-type header you get back and use that to determine the file extension.

    So, if the filename as determined by your ListLast() call doesn’t end in .jpg, .jpeg, .png etc, then read the oHttp.responseHeader[“content-type”] which will be image/jpeg or image/png to determine the file extension to add.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I have shell script which goes through all the media (audio,video) files in
I am making a little script which goes through all of the images in
So, I'm trying to make myself a Python script which goes through the selected
I have script which allows to display Bing search results. I can call for
i have a script which is for virtual keyboard, i am facing some problem
I have a script which validates each stage of a form and adds a
I have a script which I can run perfectly if I call it manually
I have a script which similar to this: foo.php class Foo { function Foo()
I have VB Script which is connected with the my database (SQL Server 2008),
I have this script which basically toggles a bgColor class on and off so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.