|
Prev: Correct syntax for selectnode
Next: NATURIST
From: TomWA007 on 14 Jun 2008 09:09 I am attempting to do a direct upload to youtube using server side vbscript. I need to transmit the video with the following headers/ format. You can see this documentation at http://code.google.com/apis/youtube/developers_guide_protocol.html#Sending_a_Direct_Upload_API_Request POST /feeds/api/users/default/uploads HTTP/1.1 Host: uploads.gdata.youtube.com Authorization: AuthSub token="<authentication_token>" X-GData-Client: <client_id> X-GData-Key: key=<developer_key> Slug: <video_filename> Content-Type: multipart/related; boundary="<boundary_string>" Content-Length: <content_length> Connection: close --<boundary_string> Content-Type: application/atom+xml; charset=UTF-8 API_XML_request --<boundary_string> Content-Type: <video_content_type> Content-Transfer-Encoding: binary <Binary File Data> --<boundary_string>-- I get the file using the adodb.stream object and can transmit using the msxml2.serverxmlhttp object. All the headers for the post are easy enough, but once I get down to the part where it starts -- <boundary_string> with some other non-binary information with the <Binary File Data> embedded in the middle I have no idea how I can accomplish this. My original thought was to do this as part of the "send", but the send only accepts one paramenter and I can't join binary and non-binary data into a variable to transmit. So my Original idea was this: Set objXMLDoc = CreateObject("Msxml2.ServerXMLHTTP.4.0") objXMLDOC.setTimeouts toResolve, toConnect, toSend, toReceive objXMLDOC.open "POST", FileUploadAddress, False objXMLDOC.setRequestHeader "Host", "uploads.gdata.youtube.com" objXMLDOC.setRequestHeader "Authorization", "GoogleLogin " & AuthToken objXMLDOC.setRequestHeader "X-GData-Client", "ytapi-..." objXMLDOC.setRequestHeader "X-GData-Key", "key=AI39si7r..." objXMLDOC.setRequestHeader "Slug", "the_irish_jig.wmv" objXMLDOC.setRequestHeader "Content-Type", "multipart/related; boundary=""f93dcbA3""" objXMLDOC.setRequestHeader "Content-Length", len(DataToSend) objXMLDOC.setRequestHeader "Connection", "close" objXMLDoc.send(DataToSend) If anyone has any suggestions or advice I would really appreciate it.
|
Pages: 1 Prev: Correct syntax for selectnode Next: NATURIST |