pull/19/head
sy-records 2023-07-25 12:51:32 +08:00
parent 772928d589
commit ca9cdfccaa
No known key found for this signature in database
GPG Key ID: C3BB4FF13CD72ACE
2 changed files with 3 additions and 3 deletions

View File

@ -56,4 +56,4 @@ GitHub 下载节点:[https://github.com/sy-records/aliyun-oss-wordpress/releas
![设置页面](screenshot-1.png)
![update-wordpress-posts-photos.png](screenshot-2.png
![update-wordpress-posts-photos.png](screenshot-2.png)

View File

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