mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: allow specifying s3 config via globals
This refactors handling of s3 so it can be specified via GlobalSetting This means that in a multisite environment you can configure s3 uploads without actual sites knowing credentials in s3 It is a critical setting for situations where assets are mirrored to s3.
This commit is contained in:
@@ -20,8 +20,13 @@ describe Stylesheet::Importer do
|
||||
end
|
||||
|
||||
it "applies S3 CDN to background category images" do
|
||||
SiteSetting.s3_use_iam_profile = true
|
||||
SiteSetting.s3_upload_bucket = 'test'
|
||||
SiteSetting.s3_region = 'ap-southeast-2'
|
||||
SiteSetting.s3_cdn_url = "https://s3.cdn"
|
||||
|
||||
SiteSetting.enable_s3_uploads = true
|
||||
|
||||
background = Fabricate(:upload_s3)
|
||||
category = Fabricate(:category, uploaded_background: background)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user