To upload a file to server
strBoundary = AlphaNumString(32)
strBody = "--" & strBoundary & vbCrLf
strBody = strBody & "Content-Disposition: form-data; name=""" & UploadName & """; filename=""" & filename & """" & vbCrLf
strBody = strBody & "Content-Type: " & MimeType & vbCrLf
strBody = strBody & vbCrLf & strData
strBody = strBody & vbCrLf & "--" & strBoundary & "--"
Length = Len(strBody)
strHTTP = "POST " & DestUrl.URI & "?" & DestUrl.Query & " HTTP/1.0" & vbCrLf
strHTTP = strHTTP & "Host: " & DestUrl.Host & vbCrLf
strHTTP = strHTTP & "Content-Type: multipart/form-data, boundary=" & strBoundary & vbCrLf
strHTTP = strHTTP & "Content-Length: " & Length & vbCrLf & vbCrLf
strHTTP = strHTTP & strBody