diff --git a/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/ERS3Attachment.java b/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/ERS3Attachment.java index 22ce426c1a9..5f09d1f84a8 100644 --- a/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/ERS3Attachment.java +++ b/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/ERS3Attachment.java @@ -183,11 +183,24 @@ public String acl() { } public QueryStringAuthGenerator queryStringAuthGenerator() { - return new QueryStringAuthGenerator(accessKeyID(), secretAccessKey(), false); + String host = ERXProperties.stringForKey("er.attachment." + configurationName() + ".s3.host"); + if (host == null) { + host = ERXProperties.stringForKey("er.attachment.s3.host"); + } + if (host == null) + return new QueryStringAuthGenerator(accessKeyID(), secretAccessKey(), false); + else + return new QueryStringAuthGenerator(accessKeyID(), secretAccessKey(), false, host); } public AWSAuthConnection awsConnection() { - AWSAuthConnection conn = new AWSAuthConnection(accessKeyID(), secretAccessKey(), true); - return conn; + String host = ERXProperties.stringForKey("er.attachment." + configurationName() + ".s3.host"); + if (host == null) { + host = ERXProperties.stringForKey("er.attachment.s3.host"); + } + if (host == null) + return new AWSAuthConnection(accessKeyID(), secretAccessKey(), true); + else + return new AWSAuthConnection(accessKeyID(), secretAccessKey(), true, host); } } diff --git a/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/package.html b/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/package.html index f337d5c0d67..d106eca10b1 100644 --- a/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/package.html +++ b/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/package.html @@ -243,6 +243,9 @@

S3 Attachments

er.attachment.s3.bucket / er.attachment.[configurationName].s3.bucket
(required) The name of the bucket to store and retrieve attachments into. The bucket must already exist in your S3 account.
+ +
er.attachment.s3.host / er.attachment.[configurationName].s3.host
+
(optional) Defaults to s3.amazonaws.com. Use this property if your bucket is not in the default region. For example put s3-eu-west-1.amazonaws.com for EU(Ireland).
er.attachment.s3.key / er.attachment.[configurationName].s3.key
(optional) The name of the file to store in the S3 bucket. This is evaluated as a path template. The default value is "${pk}${ext}".