Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: oHTTP.HTTPGet post file to FreeASPUpload page?

$
0
0
Re: oHTTP.HTTPGet post file to FreeASPUpload page?
West Wind Internet Protocols
Re: oHTTP.HTTPGet post file to FreeASPUpload page?
Nov. 30, 2012
01:31 pm
3NN0SZOYIShow this entire thread in new window
Gratar Image based on email address
From:Michael Hogan
To:Rick Strahl
wwIPStuff version 5.64... So I must be missing something else.


Hi Michael,

That looks right...

Make sure you're using a fairly recent version of wwHttp/wwIPStuff. There was a small problem with the MIME formatting that would throw some HTTP parsers (missing dashes at the end). Been fixed though and tested with various platforms.

5.6x forward should be OK.

+++ Rick ---



I'm trying to automate posting a file to an FreeASPUpload page, but it's returning result: "Error in parsing uploaded binary request."

I'm using very simple code:

oHTTP = createObject("wwHTTP") oHTTP.nHttpPostMode = 2 && Multipart form encoding oHTTP.AddPostKey() && Clear existing POST buffer*** Post a file and a regular form variable oHttp.AddPostKey("attach1","c:\install.log",.T.) lcHTML = oHTTP.HTTPGet("http://www.chamberware.com/uploadTester.asp")STRTOFILE(lcHTML,"ReturnedHTML.HTM",0)

Looking at the ASP source code, it appears to be triggered by this ASP VB InstrB function:

PrivateFunction SkipToken(sToken, nStart) SkipToken = InstrB(nStart, VarArrayBinRequest, sToken)If SkipToken = 0 then...

Now... this particular upload tool requires some FORM elements are set for the code to work, but I don't know how to duplicate that in my HTTPGet call:
<code>
The following attributes of the FORM element are required and must have these exact values:

method="POST"
enctype="multipart/form-data"
accept-charset="utf-8"

Any suggestions would be gratefully accepted...




Viewing all articles
Browse latest Browse all 10393

Trending Articles