2

我正在尝试使用 GData Youtube .NET API 上传视频,但以下 HTTP 请求出现错误:

POST /feeds/api/users/default/uploads HTTP/1.1
Content-Type: multipart/related; boundary="END_OF_PART"
User-Agent: G-AzureDevelopment/GDataGAuthRequestFactory-CS-Version=2.1.0.0--IEnumerable
X-GData-Key: 
MIME-version: 1.0
Slug: Wildlife 4.mp4 - 10:11:27.0714482
Authorization: GoogleLogin auth=
GData-Version: 2.0
Host: uploads.gdata.youtube.com
Content-Length: 8879669
Expect: 100-continue


Media multipart posting
--END_OF_PART
Content-Type: application/atom+xml; charset=UTF-8

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005">
  <media:group xmlns:media="http://search.yahoo.com/mrss/">
    <media:title>Titre de la vidéo</media:title>
    <media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Shows</media:category>
    <media:keywords>High Tech, Windows, Windows Phone</media:keywords>
    <media:description>Description de la vidéo...</media:description>
    <yt:private xmlns:yt="http://gdata.youtube.com/schemas/2007" />
  </media:group>
  <yt:location xmlns:yt="http://gdata.youtube.com/schemas/2007">Paris, France</yt:location>
  <title type="text">Titre de ma vidéo</title>
  <summary type="text">Résumé de la vidéo</summary>
</entry>
--END_OF_PART
Content-Type: video/mp4
Content-Transfer-Encoding: binary

响应是 HTTP 400 错误请求,内容如下:

<errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>InvalidEntryException</code><internalReason>Validation failed</internalReason></error></errors>

有谁知道 HTTP 请求出了什么问题,或者我怎样才能获得有关该错误的更多详细信息?

谢谢

朱利安

4

0 回答 0