Skip to content
This repository was archived by the owner on Feb 22, 2019. It is now read-only.
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,6 @@ gradle-app.setting

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

# Maven
target/
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,13 @@ private static PutObjectRequest createDirectoryPutObjectRequest(String bucketNam
}

private static String getBucketRegion(AWSCredentialsProvider credentialsProvider, ClientConfiguration clientConfiguration, String bucketName) {
return AmazonS3Client.builder()
String bucketRegion = AmazonS3Client.builder()
.withCredentials(credentialsProvider)
.withClientConfiguration(clientConfiguration)
.enableForceGlobalBucketAccess()
.build()
.getBucketLocation(bucketName);
return "US".equals(bucketRegion) ? "us-east-1" : bucketRegion;
}

@Override
Expand Down