gpt4 book ai didi

ajax - Ajax YouTube上传

转载 作者:行者123 更新时间:2023-12-03 05:33:53 24 4
gpt4 key购买 nike

我正在尝试将可恢复的视频上传到YouTube,
如此处所述:youtube resumable upload api
但是我收到错误消息:“NetworkError:404未找到-http://uploads.gdata.youtube.com/resumable/feeds/api/users/default/uploads”。
这是代码:

var http = new XMLHttpRequest();
var url =“http://uploads.gdata.youtube.com/resumable/feeds/api/users/default/uploads”;
http.open(“POST”,url,true);
http.setRequestHeader(“Host”,“uploads.gdata.youtube.com”);
http.setRequestHeader(“Authorization”,“AuthSub token = \” yDXi4sfOb8RYWDIH .... MEAxMzE0MzAzMDEy \“”“);
http.setRequestHeader(“GData-Version”,2);
http.setRequestHeader(“X-GData-Key”,“key = DI39si4Tl .... 18OaRy”);
http.setRequestHeader(“Content-length”,0);
http.setRequestHeader(“Slug”,“test.avi”);
http.send(null);

我将不胜感激。

最佳答案

浏览器不支持可恢复的上载和直接上载功能-特别是它们违反了browser same origin policies。您需要使用browser based uploading或代理通过服务器上传的内容。

关于ajax - Ajax YouTube上传,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7197691/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com