Skip to content

Commit

Permalink
added option to set s3 forcePathStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
rsehr committed Jan 14, 2025
1 parent 95ebf8c commit 38e81f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/de/sub/goobi/config/ConfigurationHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,10 @@ public int getS3SocketTimeout() {
return getLocalInt("S3SocketTimeout", 10000);
}

public boolean isS3UseForcePathStyle() {
return getLocalBoolean("S3ForcePathStyle", false);
}

/*
* category in goobi_config.properties: PROXY SERVER
*/
Expand Down
1 change: 1 addition & 0 deletions src/main/java/de/sub/goobi/helper/S3FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public static S3AsyncClient createS3Client() throws URISyntaxException {
.targetThroughputInGbps(20.0)
.endpointOverride(endpoint)
.credentialsProvider(prov)
.forcePathStyle(conf.isS3UseForcePathStyle())
.checksumValidationEnabled(false)
.build();
} else {
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/template.properties
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ downloadAvailableColumn=PlaceOfPublication
# The timeout for socket concerning things
#S3SocketTimeout=10000

# sets forcePathStyle, this is needed when s3 endpoint contains multiple dots
#S3ForcePathStyle=false


# -----------------------------------
# proxy server
# -----------------------------------
Expand Down

0 comments on commit 38e81f8

Please sign in to comment.