...
|
...
|
@@ -499,10 +499,10 @@ class Almighty extends Api |
|
|
$config = get_addon_config('qiniu');
|
|
|
$auth = new Auth($config['app_key'], $config['secret_key']);
|
|
|
//设置转码参数
|
|
|
$fops = "avthumb/pcm/ab/192k";
|
|
|
$fops = "avthumb/amr/ab/192k";
|
|
|
//通过添加'|saveas'参数,指定处理后的文件保存的bucket和key 不指定默认保存在当前空间,bucket为目标空间,后一个参数为转码之后文件名
|
|
|
$filename = str_replace(strrchr($key, "."),"",$key);
|
|
|
$entry = $config['bucket'] . ':' . $filename . '.pcm';
|
|
|
$entry = $config['bucket'] . ':' . $filename . '.amr';
|
|
|
$saveas_key = $auth->base64_urlSafeEncode($entry);
|
|
|
|
|
|
$fops = $fops.'|saveas/'.$saveas_key;
|
...
|
...
|
@@ -524,8 +524,9 @@ class Almighty extends Api |
|
|
$res = $client->request('POST', $config['uploadurl'], [
|
|
|
'multipart' => $multipart
|
|
|
]);
|
|
|
halt($res);
|
|
|
// halt($res);
|
|
|
$code = $res->getStatusCode();
|
|
|
halt($code);
|
|
|
//成功不做任何操作
|
|
|
} catch (\GuzzleHttp\Exception\ClientException $e) {
|
|
|
return false;
|
...
|
...
|
|