mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Split options into another method so that plugins can use it.
This commit is contained in:
parent
205be0d044
commit
1916924304
1 changed files with 6 additions and 2 deletions
|
@ -66,7 +66,7 @@ class S3Helper
|
||||||
path
|
path
|
||||||
end
|
end
|
||||||
|
|
||||||
def s3_resource
|
def s3_options
|
||||||
opts = { region: SiteSetting.s3_region }
|
opts = { region: SiteSetting.s3_region }
|
||||||
|
|
||||||
unless SiteSetting.s3_use_iam_profile
|
unless SiteSetting.s3_use_iam_profile
|
||||||
|
@ -74,7 +74,11 @@ class S3Helper
|
||||||
opts[:secret_access_key] = SiteSetting.s3_secret_access_key
|
opts[:secret_access_key] = SiteSetting.s3_secret_access_key
|
||||||
end
|
end
|
||||||
|
|
||||||
Aws::S3::Resource.new(opts)
|
opts
|
||||||
|
end
|
||||||
|
|
||||||
|
def s3_resource
|
||||||
|
Aws::S3::Resource.new(s3_options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def s3_bucket
|
def s3_bucket
|
||||||
|
|
Loading…
Reference in a new issue