Using CFHTTP to get a file

Participant ,
Jul 26, 2007 Jul 26, 2007

Copy link to clipboard

Copied

I am trying to copy a file from one of our servers to another. Usually I use CFHTTP for the .csv files and have no problem. Now we have some tab delimited files that have a header on top. When I use the CFHTTP tag I get the error:

"Incorrect number of columns in row.
Please check the number of columns specified in the columns attribute and in the target file "

I never state the number of columns:

<cfhttp url = " http://..." method = "get" name="getrif" firstrowasheaders="No">

How can I copy this file over to my server?

Views

2.4K

Likes

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

Explorer , Jul 26, 2007 Jul 26, 2007
Does this help? <cfhttp url = " http://yourUrl/yourFile.ext" method = "get" getasbinary="yes"> <cfdump var="#ToString(cfhttp.filecontent)#" />

Likes

Translate

Translate
Explorer ,
Jul 26, 2007 Jul 26, 2007

Copy link to clipboard

Copied

Does this help?

<cfhttp url = " http://yourUrl/yourFile.ext" method = "get" getasbinary="yes">

<cfdump var="#ToString(cfhttp.filecontent)#" />

Likes

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 ,
Jul 27, 2007 Jul 27, 2007

Copy link to clipboard

Copied

LATEST
Thanks Hal that worked.

Likes

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