![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Direct Upload to youtube 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/...ad_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. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| YouTube | Vista music pictures video | |||
| No Youtube | Browsers & Mail | |||
| youtube | Network & Sharing | |||
| IE 7 & YouTube | Vista General | |||
| Youtube and JavaScript and XP | Vista General | |||