.net核心上的Vimeo API上传视频

时间:2017-10-17 10:55:19

标签: angular asp.net-core vimeo-api

我在vs2017上使用.net核心角度模板。我想录制视频,并使用VimeoAPI将它们发布到Vimeo。当我尝试上传视频时,我在Vimeo模块内的“filestreamer.js”文件中收到错误“fs_module.stat不是函数”。如何修复错误,我做错了什么?

 uploadVideo() {

    const lib = new Vimeo(this.ci, this.cs, this.at);
    console.log(lib);
    const fakeAddress: any = 'C:\\test.webm';

    lib.streamingUpload(fakeAddress,  function (error: any, body: any, status_code: any, headers:any) {
    if (error) {
        throw error;
    }

    // tslint:disable-next-line:no-shadowed-variable
    lib.request(headers.location, function (error: any, body: any, status_code: any, headers: any) {
        console.log(body);
    });
    }, function (upload_size: any, file_size: any) {
        console.log('You have uploaded ' + Math.round((upload_size / file_size) * 100) + '% of the video');
    });
  }

0 个答案:

没有答案