Feb 23, 2014 03:19 PM
(This post was last modified: Feb 23, 2014 03:20 PM by topLevel.)
Here you go.
picArray[] is the file data.
picArray[] is the file data.
Code
Local $boundary = "a65h7a" & @CRLF
Local $boundary2 = "--" & $boundary
Local $binary = "Content-Transfer-Encoding: binary" & @CRLF
local $typeCon = "Content-Type: txt/html" & @CRLF & @CRLF
Local $postData = $boundary2
$postData &= 'Content-Disposition: form-data; name="file[]"; filename="1.txt"' & @CRLF
$postData &= $typeCon
$postData &= $picArray[1] & @CRLF
$postData &= $boundary2
$postData &= 'Content-Disposition: form-data; name="file[]"; filename="2.txt"' & @CRLF
$postData &= $typeCon
$postData &= $picArray[2] & @CRLF
$postData &= "--a65h7a--" ;End of HTTP HEADER
;begin send
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("POST", $upshot, False)
$oHTTP.SetRequestHeader("Content-Type", "multipart/form-data; boundary=" & $boundary)
$oHTTP.Send($postData)
