//转存wav
function savewav() {
$fileUrl=input('wav');
$accessKey =$this->config['accessKey'];
$secretKey =$this->config['secretKey'];
$auth =new Auth($accessKey, $secretKey);
$bucket =$this->config['bucket'];
$fileContents=file_get_contents($fileUrl);
$time=time();
$upManager =new UploadManager();
$auth =new Auth($accessKey, $secretKey);
$token =$auth->uploadToken($this->config['bucket']);
$result =$upManager->put($token, $key ='/wav/some/'.$time.'.wav',$fileContents);
return result ;
}
网友评论