使用节点js中的vimeo api进行视频上传无法正常工作?

时间:2015-09-10 12:41:24

标签: javascript vimeo-api

我正在尝试将视频上传到vimeo.Ajax帖子已中止。但视频已保存在vimeo中。但无法播放。它表示上传错误。

Belo是我的代码

function testVideoUpload1(callback){
var Vimeo = require('vimeo').Vimeo;
//CLIENT_ID, CLIENT_SECRET, ACCESS_TOKEN
var vimeoDetails = reactConfig.vimeoDetails;
var lib = new Vimeo(vimeoDetails.clientId, vimeoDetails.clientSecret, vimeoDetails.clientAccessToken);

lib.streamingUpload("/AppGenFlux/Wildlife.wmv", function (err, body, status, headers) {
    if (err) {
        return console.log("eror = "+err);
    }
    console.log("status = "+status);
    console.log("location = "+headers.location);
    // callback(body);
     lib.request(headers.location, function (error, body, status_code, headers) {
         console.log(1);
         console.log(body);
     });
});

}

0 个答案:

没有答案