williey
Technical User
- Jan 21, 2004
- 242
I found this piece of code written by Jeff Jones. It works great. But has anyone manage to get it to work with Windows Authentication?
------------------------------------------
There are 10 kinds of people in this world. One that understands binary and the other one that does not.
Code:
'====================== WebDAV upload single file
Function WebUploadFile (file, url, user, pass)
Dim objXMLHTTP
Dim objADOStream
Dim arrbuffer
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1
objADOStream.LoadFromFile file
arrbuffer = objADOStream.Read()
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objXMLHTTP.SetOption 2, objXMLHTTP.GetOption(2)
objXMLHTTP.open "PUT", url, False, user, pass
objXMLHTTP.send arrbuffer
End Function
------------------------------------------
There are 10 kinds of people in this world. One that understands binary and the other one that does not.