G
garbagecatcher
Hello,
here's my problem:
On my web server I generate a file, I need to send this
file to a different web server.
I have no control over the other web server.
The only way they accept files is through input type="file"
Since I generate the file on my server, I'd like to post
this directly to their server without the user having to
download the file from my server, and go to the other
server to upload it.
Right now I'm using XMLHTTP (post) to login to the other
webserver, this works fine:
Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "POST", "https://domain.com/login.asp", False
xml.setRequestHeader "lastCached", now()
xml.setRequestHeader "Content-Type", "application/x-www-
form-urlencoded"
xml.Send "username=username&password=password"
Response.Write xml.responseText
Set xml = Nothing
Can I use this same process (XMLHTTP) to read and post a
file? What is the syntax for that? I'm not normally an asp
programmer so any detailed instructions would really be
appreciated!
Thanks
here's my problem:
On my web server I generate a file, I need to send this
file to a different web server.
I have no control over the other web server.
The only way they accept files is through input type="file"
Since I generate the file on my server, I'd like to post
this directly to their server without the user having to
download the file from my server, and go to the other
server to upload it.
Right now I'm using XMLHTTP (post) to login to the other
webserver, this works fine:
Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "POST", "https://domain.com/login.asp", False
xml.setRequestHeader "lastCached", now()
xml.setRequestHeader "Content-Type", "application/x-www-
form-urlencoded"
xml.Send "username=username&password=password"
Response.Write xml.responseText
Set xml = Nothing
Can I use this same process (XMLHTTP) to read and post a
file? What is the syntax for that? I'm not normally an asp
programmer so any detailed instructions would really be
appreciated!
Thanks