如何在php中从我的服务器上传vimeo视频

时间:2016-01-22 09:23:51

标签: php api vimeo

我正在使用vimeo api,但我无法通过他们的文档说明的上传方法上传任何视频

if($this->request->is('post')){
    $client_identifier=REMOVED;
    $client_secret=REMOVED;        
    $check=$this->Accesstoken->find('all',array(
        'conditions'=> array('user_id'=>$this->Auth->user('id'))
    ));

    $access_token=$check[0]['Accesstoken']['vimeo_token'];

    $vim = new \Vimeo\Vimeo($client_identifier, $client_secret,$access_token);

    $video_uri=$vim->upload($this->request->params['form']['file_data']['tmp_name'], false);
    $metadata=array('name'=>'test11');
    $response=$vim->request($video_uri,$metadata,'PATCH');
}

0 个答案:

没有答案