2012-04-23 11 views
0

私はVimeo PHPライブラリhttps://github.com/vimeo/vimeo-php-libをクライアント用に移植しており、ビデオアップロードPOSTリクエスト以外のすべてを正常に翻訳できました。 PHP libには、次のようにcURLを使用しています。Port Vimeo PHP POSTリクエストをアップロード

 

    $params = array(
     'oauth_consumer_key'  => $this->_consumer_key, 
     'oauth_token'   => $this->_token, 
     'oauth_signature_method' => 'HMAC-SHA1', 
     'oauth_timestamp'  => time(), 
     'oauth_nonce'   => $this->_generateNonce(), 
     'oauth_version'   => '1.0', 
     'ticket_id'    => $ticket, 
     'chunk_id'    => $i 
    ); 

    // Generate the OAuth signature 
    $params = array_merge($params, array(
     'oauth_signature' => $this->_generateSignature($params, 'POST', self::API_REST_URL), 
     'file_data'  => '@'.$chunk['file'] // don't include the file in the signature 
    )); 

    // Post the file 
    $curl = curl_init($endpoint); 
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 
    curl_setopt($curl, CURLOPT_POST, 1); 
    curl_setopt($curl, CURLOPT_POSTFIELDS, $params); 
    $rsp = curl_exec($curl); 
    curl_close($curl); 

答えて

0

CFScriptでそれを行うことができますが、のcfhttpparamとしてファイルを指定することができますかわかりません。

<cfhttp url="something.com"> 
<cfhttpparam type="file" file="c:\temp\myfile"/> 
</cfhttp> 

私は何が欠けていますか?

+0

あなたの投稿を見てから、私は逃げ出し、cfhttpをベースにしたスクリプトを試しました:)私は大部分のスクリプトを使っていますが、cfhttpのために試したことはありませんでした。 –

関連する問題