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

How to extract an image from a link??

Guest
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

Hello,

I have been trying to extract and save the image in this url to a specific directory on our server. I am able to do it with .mov or .mpg files, but not this link.

Here is the cfhttp code:

<cfhttp method="get" getasbinary="yes"
url=" http://pictures.sprintpcs.com//mmps/RECIPIENT/001_10b1f179964f9d55_1/2.2?inviteToken=fEBr457aYzYZf7R...
path="e:\inetpub\wwwroot\\inbox\image_attachments"
file="#file_content#"></cfhttp>


Would anyone know how to do this?? Thanks!!
TOPICS
Advanced techniques

Views

682

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

Deleted User
Feb 09, 2007 Feb 09, 2007
Wait!!!!!! I forgot to change the URL. I did that and it work!!!!!

Thank you so much. I don't know what I would do without you guys.

Votes

Translate

Translate
Contributor ,
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

Try changing getasbinary="auto"

Just a thought.

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
Guest
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

Thanks for responding.

Unfortunately it did not work. Any other ideas???

Thanks

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
Participant ,
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

There must be a problem with character encoding in the query string. Try to replace "&" with "&" before submitting request.

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
Guest
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

Do you mean in the URL to which it is going to try and retrive the image??

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
Guest
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

If so, I did try that and it did not work.

Any other ideas????

thanks

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
Participant ,
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

<CFSET myURL="....">
<CFSET agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)">
<CFSET myPath="...">
<CFSET myFile="test.jpg">

<CFHTTP method="get" url=#myURL# path=#myPath# file=#myFile# userAgent=#agent#></cfhttp>

Doesn't like user agent COLDFUSION, which is sent by default. Plus file should define the file name.

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
Guest
Feb 09, 2007 Feb 09, 2007

Copy link to clipboard

Copied

I tried it, but it still does not work. When I try to open the file, it reads "Connection Failure".

Were you able to grab to image???

Thanks

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
Guest
Feb 09, 2007 Feb 09, 2007

Copy link to clipboard

Copied

LATEST
Wait!!!!!! I forgot to change the URL. I did that and it work!!!!!

Thank you so much. I don't know what I would do without you guys.

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