我正在尝试使用NSURLRequest将视频上传到youtube.
我能够进行身份验证,并且用户和视频也会上传,如果选中则显示失败(无法转换视频文件)我无法做什么,请使用usggest
我能够进行身份验证,并且用户和视频也会上传,如果选中则显示失败(无法转换视频文件)我无法做什么,请使用usggest
构造的请求
Authorization = "Bearer ya29.AHES6ZTQ3rJZaf2g3pIYa_7_myg1N_GvQ4VdmJIcapfoqKIfQf-Iow"; Connection = close; "Content-Length" = 1848078; "Content-Type" = "multipart/related; boundary=217NH17UDP"; "GData-Version" = 2; Host = "uploads.gdata.youtube.com"; Slug = "videoFile.mp4"; "X-GData-Key" = "key=AI39si4b-ta8ku-hbsLt73O0rIlOBjpHbITt8WGrwL7OevwjNjl5EFcowlJlBM6kp3rrU1cw64Vobp1l1lJP31Rqavshl4962A"; --217NH17UDP Content-Type: application/atom+xml; charset=UTF-8 <?xml version="1.0"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mRSS/" xmlns:yt="http://gdata.youtube.com/schemas/2007"> <media:group> <media:title type="plain">Sample Video File</media:title> <media:description type="plain"> Description of the sample video </media:description> <media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Music </media:category> <media:keywords>Keywords</media:keywords> </media:group> </entry> --217NH17UDP Content-Type: video/mp4 Content-Transfer-Encoding: binary Video data (NSData) --217NH17UDP--
请建议……
解决方法
您可能想将content_type设置为视频/ *