mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 21:33:43 +08:00
DB based S3 settings fixes for s3:upload_assets
.
This commit is contained in:
parent
901611cb4e
commit
a895626d10
|
@ -43,11 +43,20 @@ end
|
||||||
|
|
||||||
def helper
|
def helper
|
||||||
@helper ||= begin
|
@helper ||= begin
|
||||||
setting = use_db_s3_config ? SiteSetting : GlobalSetting
|
bucket, options =
|
||||||
|
if use_db_s3_config
|
||||||
|
[
|
||||||
|
SiteSetting.s3_upload_bucket.downcase,
|
||||||
|
S3Helper.s3_options(SiteSetting)
|
||||||
|
]
|
||||||
|
else
|
||||||
|
[
|
||||||
|
GlobalSetting.s3_bucket.downcase,
|
||||||
|
S3Helper.s3_options(GlobalSetting)
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
S3Helper.new(
|
S3Helper.new(bucket, '', options)
|
||||||
setting.s3_bucket.downcase, '', S3Helper.s3_options(setting)
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user