From 74ddd0d21823a04cebf050f0cc9f521283e829b5 Mon Sep 17 00:00:00 2001 From: dominik-cnx <30789476+dominik-cnx@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:04:56 +0700 Subject: [PATCH] doc improved --- README.md | 2 +- .../org/swisspush/reststorage/s3/S3FileSystemStorage.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b15cbca..ddb9731 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,7 @@ The following configuration values are available: | s3AccessKeyId | s3 | | The s3 access key Id | | s3SecretAccessKey | s3 | | The s3 secret access key | | localS3 | s3 | | Set to true in order to use a local S3 instance instead of AWS | -| localS3Endpoint | s3 | | The endpoint/host to use in case that localS3 is set to true, e.g. localhost | +| localS3Endpoint | s3 | | The endpoint/host to use in case that localS3 is set to true, e.g. 127.0.0.1 (in my case it had to be an IP) | | localS3Port | s3 | | The port to use in case that localS3 is set to true, e.g. 4566 | | createBucketIfNotExist | s3 | | create bucket if bucket not exist, related permission required | diff --git a/src/main/java/org/swisspush/reststorage/s3/S3FileSystemStorage.java b/src/main/java/org/swisspush/reststorage/s3/S3FileSystemStorage.java index 5e44e04..461769e 100644 --- a/src/main/java/org/swisspush/reststorage/s3/S3FileSystemStorage.java +++ b/src/main/java/org/swisspush/reststorage/s3/S3FileSystemStorage.java @@ -66,7 +66,7 @@ private static S3FileSystem getFileSystem(URI uri) { public S3FileSystemStorage(Vertx vertx, RestStorageExceptionFactory exceptionFactory, String rootPath, String awsS3Region, String s3BucketName, String s3AccessKeyId, String s3SecretAccessKey, - boolean useTlsConnection, boolean isLocalS3, String localS3Endpoint, int localS3Port, boolean createBucketIfNotExist) { + boolean useTlsConnection, boolean isLocalS3, String localS3Endpoint, int localS3Port, boolean createBucketIfNotPresentYet) { this.vertx = vertx; this.exceptionFactory = exceptionFactory; Objects.requireNonNull(s3BucketName, "BucketName must not be null"); @@ -102,7 +102,7 @@ public S3FileSystemStorage(Vertx vertx, RestStorageExceptionFactory exceptionFac var uri = URI.create(s3BucketName); - if (createBucketIfNotExist) { + if (createBucketIfNotPresentYet) { try (var fs = FileSystems.newFileSystem(uri, Map.of("locationConstraint", awsS3Region))) { log.info("Bucket created: " + fs.toString());