classes/Cloud/Storage/Driver/S3/S3Storage.php
protected function getBucketRegion() {
		if(!$this->enabled()) {
			return false;
		}

		$config = [
			'version' => 'latest',
			'credentials' => [
				'key' => $this->key,
				'secret' => $this->secret
			]
		];

		if(!empty($this->endpoint)) {
			$config['endpoint'] = $this->endpoint;
			if($this->endPointPathStyle) {
				$config['use_path_style_endpoint'] = true;
			}
		}

		$s3 = new S3MultiRegionClient($config);
		$region = false;
		try {
			$region = $s3->determineBucketRegion($this->bucket);
		}
		catch(AwsException $ex) {
			Logger::error("AWS Error fetching region", ['exception' => $ex->getMessage()]);
		}

		return $region;
	}
protected function getBucketRegion() {
		if(!$this->enabled()) {
			return false;
		}

		$config = [
			'version' => 'latest',
			'credentials' => [
				'key' => $this->key,
				'secret' => $this->secret
			]
		];

		if(!empty($this->endpoint)) {
			$config['endpoint'] = $this->endpoint;
			if($this->endPointPathStyle) {
				$config['use_path_style_endpoint'] = true;
			}
		}

		$s3 = new S3MultiRegionClient($config);
		$region = false;
		try {
			$region = $s3->determineBucketRegion($this->bucket);
		}
		catch(AwsException $ex) {
			Logger::error("AWS Error fetching region", ['exception' => $ex->getMessage()]);
		}

		return $region;
	}
protected function getBucketRegion ( ) { if ( ! $ this -> enabled ( ) ) { return false ; } $ config = [ 'version' => 'latest' , 'credentials' => [ 'key' => $ this -> key , 'secret' => $ this -> secret ] ] ; if ( ! empty ( $ this -> endpoint ) ) { $ config [ 'endpoint' ] = $ this -> endpoint ; if ( $ this -> endPointPathStyle ) { $ config [ 'use_path_style_endpoint' ] = true ; } } $ s3 = new S3MultiRegionClient ( $ config ) ; $ region = false ; try { $ region = $ s3 -> determineBucketRegion ( $ this -> bucket ) ; } catch ( AwsException $ ex ) { Logger :: error ( "AWS Error fetching region" , [ 'exception' => $ ex -> getMessage ( ) ] ) ; } return $ region ; }
Attempts to determine the region for the bucket
@return bool|string
Attempts to determine the region for the bucket