Skip to content
This repository was archived by the owner on Apr 30, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ protected void connectToRepository(Repository repository, AuthenticationInfo aut
this.baseDirectory = S3Utils.getBaseDirectory(repository);

this.amazonS3 = new AmazonS3Client(credentialsProvider, clientConfiguration);
Region region = Region.fromLocationConstraint(this.amazonS3.getBucketLocation(this.bucketName));
this.amazonS3.setEndpoint(region.getEndpoint());
try {
Region region = Region.fromLocationConstraint(this.amazonS3.getBucketLocation(this.bucketName));
this.amazonS3.setEndpoint(region.getEndpoint());
} catch (AmazonS3Exception ae) {
//most likely not the bucket owner, set some default
this.amazonS3.setEndpoint(Region.US.getEndpoint());
}
}
}

Expand Down