public function sendFile($filePath, $oauth_token)
    {
        $result = $this->call('file.upload', [], $oauth_token);
        $timeout = $this->timeout;
        $this->timeout = null;
        $result = json_decode($this->httpRequest($result['upload_url'], ['file' => '@' . $filePath]), true);
        $this->timeout = $timeout;

        return $result['url'];
    }
public function sendFile($filePath, $oauth_token)
    {
        $result = $this->call('file.upload', [], $oauth_token);
        $timeout = $this->timeout;
        $this->timeout = null;
        $result = json_decode($this->httpRequest($result['upload_url'], ['file' => '@' . $filePath]), true);
        $this->timeout = $timeout;

        return $result['url'];
    }
public function sendFile ( $ filePath , $ oauth_token ) { $ result = $ this -> call ( 'file.upload' , [ ] , $ oauth_token ) ; $ timeout = $ this -> timeout ; $ this -> timeout = null ; $ result = json_decode ( $ this -> httpRequest ( $ result [ 'upload_url' ] , [ 'file' => '@' . $ filePath ] ) , true ) ; $ this -> timeout = $ timeout ; return $ result [ 'url' ] ; }
Upload a file on the Dailymotion servers and generate an URL to be used with API methods.

@param String $filePath    a path to the file to upload
@param String $oauth_token a path to the file to upload

@return String the resulting URL
Upload a file on the Dailymotion servers and generate an URL to be used with API methods .