Rename
parent
772928d589
commit
ca9cdfccaa
|
@ -56,4 +56,4 @@ GitHub 下载节点:[https://github.com/sy-records/aliyun-oss-wordpress/releas
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|
||||||
|
|
|
@ -27,7 +27,7 @@ if (!function_exists('get_home_path')) {
|
||||||
require_once(ABSPATH . 'wp-admin/includes/file.php');
|
require_once(ABSPATH . 'wp-admin/includes/file.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
class AlibabaCloudCredentialsWrapper implements CredentialsProvider
|
class OSSCredentialsWrapper implements CredentialsProvider
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \OSS\Credentials\Credentials
|
* @var \OSS\Credentials\Credentials
|
||||||
|
@ -82,7 +82,7 @@ function oss_get_client()
|
||||||
// 填写角色名称。
|
// 填写角色名称。
|
||||||
'role_name' => $roleName,
|
'role_name' => $roleName,
|
||||||
]);
|
]);
|
||||||
$providerWarpper = new AlibabaCloudCredentialsWrapper($ecsRamRole);
|
$providerWarpper = new OSSCredentialsWrapper($ecsRamRole);
|
||||||
$provider = $providerWarpper->getCredentials();
|
$provider = $providerWarpper->getCredentials();
|
||||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://';
|
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://';
|
||||||
$config = ['provider' => $provider, 'endpoint'=> $protocol . $endpoint];
|
$config = ['provider' => $provider, 'endpoint'=> $protocol . $endpoint];
|
||||||
|
|
Loading…
Reference in New Issue