Skip to content

Commit d6bf807

Browse files
author
Daman Arora
committed
Enable path-style access for S3-compatible storage
1 parent dd39393 commit d6bf807

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils/src/main/java/com/cloud/utils/storage/S3/S3Utils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ public static TransferManager getTransferManager(final ClientOptions clientOptio
114114
LOGGER.debug(format("Setting the end point for S3 client with access key %1$s to %2$s.", clientOptions.getAccessKey(), clientOptions.getEndPoint()));
115115

116116
client.setEndpoint(clientOptions.getEndPoint());
117+
// Enable path-style access for S3-compatible storage
118+
client.setS3ClientOptions(com.amazonaws.services.s3.S3ClientOptions.builder().setPathStyleAccess(true).build());
117119
}
118120

119121
TRANSFERMANAGER_ACCESSKEY_MAP.put(clientOptions.getAccessKey(), new TransferManager(client));

0 commit comments

Comments
 (0)