Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
bigreddastud #1
CFHTTP get as binary problems
I'm trying to pull a series of images off a remote server for manipulation and
cfhttp won't save multiple files. The first call to save works fine, but
subsequent calls on the same page fail
<CFLOOP ... over the file list to pull >
<!--- Pull the image for manipulation & save in a temp DIR --->
<cfhttp
url = #imgURL#
method = "get"
redirect = "yes"
timeout = "30"
getasbinary = "yes"
path = "c:\Temp">
</cfhttp>
<!--- Testing only --->
<CFOUTPUT><HR>request for #imgURL# returned statusCode:
#cfhttp.statusCode#<HR></CFOUTPUT>
bigreddastud Guest
-
CFHTTP
Hello, I need to send data from a CF page to an asp.net page for processing via a URL string. The ASP page takes three parameters. Those being... -
CFHTTP posts before CF MX 6.0
Thank you for taking the time to view my post. I am caught with working on a project where my friend is running ColdFusion 5 on her server and... -
CFHTTP Issue
Can someone else please try the below code? When I run the below code, I get "404 not found." I am able to reach this site on the server. Here's... -
CFHTTP help
We have an in-house built publication system that creates .htm files from database content. For a specific project, I need to modify the way that... -
64 bit binary and 32 bit binary have different result. Is it library bug or compiler bug?
#include <errno.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <dirent.h> #include <assert.h> int main(int argc, char... -
BSterner #2
Re: CFHTTP get as binary problems
It looks like if you don't specify the cfhttp "file" attribute, it uses the
name of the 1st file and then just keeps overwriting that same file. Try this.
<CFLOOP ... over the file list to pull >
<!--- Pull the image for manipulation & save in a temp DIR --->
<cfhttp
url = #imgURL#
method = "get"
redirect = "yes"
timeout = "30"
getasbinary = "yes"
path = "c:\Temp"
file="#imgURL#">
</cfhttp>
<!--- Testing only --->
<CFOUTPUT><HR>request for #imgURL# returned statusCode:
#cfhttp.statusCode#<HR></CFOUTPUT>
BSterner Guest
-
bigreddastud #3
Re: CFHTTP get as binary problems
Hmm.
Well, dynamically supplying the 'File' attribute in the CFHTTP call as
suggested above worked.
Funny thing is that it wasn't actually saving over the same file on
subsequent calls. If that were the case, I'd have ended up with the image in
the temp dir that didn't have the correct matching name (i.e. the last actual
image contents would be named the first image's name).
Either way, from the CFML reference, it should be saving the
cfhttp.fileContents the default of THAT CALL, not the first on the page or
loop. That's a bug IMO.
Thanks for the code tweak fix, I can work with that!
bigreddastud Guest



Reply With Quote

