[Rt-commit] rt branch, 4.4/s3-endpoint, created. rt-4.4.1-1-g5549b22
Shawn Moore
shawn at bestpractical.com
Mon Sep 26 10:47:02 EDT 2016
The branch, 4.4/s3-endpoint has been created
at 5549b229405f9236bd1a37d433979c1ce12f93ed (commit)
- Log -----------------------------------------------------------------
commit 5549b229405f9236bd1a37d433979c1ce12f93ed
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Mon Sep 26 10:38:59 2016 -0400
Add Host option for S3 ExternalStorage
Fixes: T#173651
diff --git a/lib/RT/ExternalStorage/AmazonS3.pm b/lib/RT/ExternalStorage/AmazonS3.pm
index 1ded7a1..62aeb67 100644
--- a/lib/RT/ExternalStorage/AmazonS3.pm
+++ b/lib/RT/ExternalStorage/AmazonS3.pm
@@ -97,11 +97,14 @@ sub Init {
}
}
- my $S3 = Amazon::S3->new( {
+ my %args = (
aws_access_key_id => $self->AccessKeyId,
aws_secret_access_key => $self->SecretAccessKey,
retry => 1,
- } );
+ );
+ $args{host} = $self->{Host} if $self->{Host};
+
+ my $S3 = Amazon::S3->new(\%args);
$self->S3($S3);
my $buckets = $S3->bucket( $self->Bucket );
@@ -240,6 +243,11 @@ RT what bucket name to use in your F<RT_SiteConfig.pm> file:
Bucket => '...', # Put bucket name between quotes
);
+=item 7.
+
+You may specify a C<Host> option in C<Set(%ExternalStorage, ...);> to connect
+to an endpoint other than L<Amazon::S3>'s default of C<s3.amazonaws.com>.
+
=back
=head2 Direct Linking
-----------------------------------------------------------------------
More information about the rt-commit
mailing list