@ -47,16 +47,16 @@ public class S3ResourceRepository extends BaseResourceRepository {
BasicAWSCredentials credentials = new BasicAWSCredentials ( config . getAccessKeyId ( ) , config . getPassword ( ) ) ;
BasicAWSCredentials credentials = new BasicAWSCredentials ( config . getAccessKeyId ( ) , config . getPassword ( ) ) ;
AmazonS3ClientBuilder amazonS3ClientBuilder = AmazonS3ClientBuilder . standard ( )
AmazonS3ClientBuilder amazonS3ClientBuilder = AmazonS3ClientBuilder . standard ( )
. withEndpointConfiguration ( new AwsClientBuilder . EndpointConfiguration ( config . getEndPoint ( ) , config . getRegion ( ) ) )
. withEndpointConfiguration ( new AwsClientBuilder . EndpointConfiguration ( config . getEndPoint ( ) , config . getRegion ( ) ) )
. withCredentials ( new AWSStaticCredentialsProvider ( credentials ) ) ;
. withCredentials ( new AWSStaticCredentialsProvider ( credentials ) ) . disableChunkedEncoding ( ) ;
if ( config . isEnablePathStyleAccess ( ) ) {
if ( config . isEnablePathStyleAccess ( ) ) {
amazonS3ClientBuilder = amazonS3ClientBuilder . enablePathStyleAccess ( ) ;
amazonS3ClientBuilder = amazonS3ClientBuilder . enablePathStyleAccess ( ) ;
}
}
ClientConfiguration clientConfiguration = new ClientConfiguration ( ) ;
if ( StringUtils . isNotEmpty ( config . getSignerOverride ( ) ) ) {
if ( StringUtils . isNotEmpty ( config . getSignerOverride ( ) ) ) {
ClientConfiguration clientConfiguration = new ClientConfiguration ( ) ;
clientConfiguration . setSignerOverride ( config . getSignerOverride ( ) ) ;
clientConfiguration . setSignerOverride ( config . getSignerOverride ( ) ) ;
clientConfiguration . setProtocol ( Protocol . HTTP ) ;
amazonS3ClientBuilder = amazonS3ClientBuilder . withClientConfiguration ( clientConfiguration ) ;
}
}
clientConfiguration . setProtocol ( Protocol . HTTP ) ;
amazonS3ClientBuilder = amazonS3ClientBuilder . withClientConfiguration ( clientConfiguration ) ;
this . s3 = amazonS3ClientBuilder . build ( ) ;
this . s3 = amazonS3ClientBuilder . build ( ) ;
this . bucket = config . getBucket ( ) ;
this . bucket = config . getBucket ( ) ;
}
}