'latest', 'region' => sysconfig('upload', 's3_region'), 'credentials' => [ 'key' => sysconfig('upload', 's3_access_key'), 'secret' => sysconfig('upload', 's3_secret_key'), ], ]; $endpoint = sysconfig('upload', 's3_endpoint'); if (!empty($endpoint)) { $options['endpoint'] = $endpoint; if (sysconfig('upload', 's3_path_style') === '1') { $options['use_path_style_endpoint'] = true; } } $client = new S3Client($options); return new AwsS3V3Adapter($client, sysconfig('upload', 's3_bucket')); } public function url(string $path): string { return $this->concatPathToUrl(sysconfig('upload', 's3_domain'), $path); } }