feat(hwobs): 返回华为obs参数
This commit is contained in:
@@ -2,16 +2,17 @@
|
||||
|
||||
namespace addons\hwobs\controller;
|
||||
|
||||
use addons\hwobs\library\Auth;
|
||||
use addons\hwobs\library\Signer;
|
||||
use app\common\exception\UploadException;
|
||||
use app\common\library\Upload;
|
||||
use app\common\model\Attachment;
|
||||
use Obs\Internal\Common\Model;
|
||||
use Obs\Internal\Signature\DefaultSignature;
|
||||
use Obs\ObsClient;
|
||||
use think\addons\Controller;
|
||||
use think\Config;
|
||||
use Obs\ObsClient;
|
||||
use addons\hwobs\Hwobs;
|
||||
use think\addons\Controller;
|
||||
use addons\hwobs\library\Auth;
|
||||
use app\common\library\Upload;
|
||||
use Obs\Internal\Common\Model;
|
||||
use addons\hwobs\library\Signer;
|
||||
use app\common\model\Attachment;
|
||||
use app\common\exception\UploadException;
|
||||
use Obs\Internal\Signature\DefaultSignature;
|
||||
|
||||
class Index extends Controller
|
||||
{
|
||||
@@ -31,6 +32,13 @@ class Index extends Controller
|
||||
$this->error("当前插件暂无前台页面");
|
||||
}
|
||||
|
||||
public function config()
|
||||
{
|
||||
$upload = [];
|
||||
(new Hwobs)->uploadConfigInit($upload);
|
||||
$this->success('', null, $upload);
|
||||
}
|
||||
|
||||
public function params()
|
||||
{
|
||||
$this->check();
|
||||
@@ -83,8 +91,7 @@ class Index extends Controller
|
||||
$signature = $obs->createPostSignature([
|
||||
'Bucket' => $config['bucket'],
|
||||
'Key' => $key,
|
||||
'FormParams' => [
|
||||
]
|
||||
'FormParams' => []
|
||||
]);
|
||||
$params['key'] = $key;
|
||||
$params['AccessKeyId'] = $config['accessKey'];
|
||||
@@ -328,5 +335,4 @@ class Index extends Controller
|
||||
$this->error("请求已经超时");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user