<cfhttpparam type="formfield" name="login" value="#InterceptUName#"
mimetype="text/plain">
<cfhttpparam type="formfield" name="pass" value="#InterceptPW#"
mimetype="text/plain"> 
<cfhttpparam type="file" name="filename" file="#TmpFile#"
mimetype="multipart/form-data">

plug these in...looks like you had the types mismatched ;)

tony weeg
uncertified advanced cold fusion developer
tony at navtrak dot net
www.navtrak.net
office 410.548.2337
fax 410.860.2337


-----Original Message-----
From: James Johnson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 15, 2003 2:43 PM
To: CF-Talk
Subject: Help with cfhttp, cfhttpparam


Been struggling with this and hoped I could get some help. Using CFMX.

I need to convert this html form:
<form action="https://www.interceptcorporation.com/uploadcsv.icp";
method="POST" enctype="multipart/form-data">
        Login: <input type="text" value="" name="login">
        Pass: <input type="password" value="" name="pass">
        File to upload to Intercept: <input type="file" name="filename">
<input type="submit" value="Send..."> </form>

to cfhttp and cfhttpparam, so it will be done automatically. The form
needs to have the multipart/form-data encoding type. This is what I
have:

<cftry>
        <cfhttp url="#InterceptURL#" method="post" resolveurl="no"
throwonerror="yes" multipart="yes">
                <cfhttpparam type="formfield" name="login"
value="#InterceptUName#" mimetype="multipart/form-data">
                <cfhttpparam type="formfield" name="pass"
value="#InterceptPW#" mimetype="multipart/form-data"> 
                <cfhttpparam type="file" name="filename"
file="#TmpFile#" mimetype="text/plain">
        </cfhttp> 
        <cfcatch type="any">
                <cfoutput>#cfhttp.StatusCode#</cfoutput>
        </cfcatch>
</cftry>
<cfoutput>
#cfhttp.FileContent# <br>
#cfhttp.StatusCode# <br>
#cfhttp.MIMEType#
</cfoutput>

The response I get from the POST shows an invalid login. Tech support at
the company I'm trying to upload to says that it's probably due from a
wrong encoding type of the form. cfhttp.MIMEType returns text/html.

There isn't a parameter in cfhttp for enctype, only mimetype.

Any ideas and/or suggestions would be appreciated. 

Thanks,

James 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to