Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for 3rd party s3-compatible object storage #7244

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/defaults.yml
Expand Up @@ -26,6 +26,9 @@ defaults:
bucket:
region:
cache: true
host: "s3.amazonaws.com"
endpoint: "https://s3.amazonaws.com"

image_redirect_url:
assets:
serve: false
Expand Down
2 changes: 2 additions & 0 deletions config/diaspora.yml.example
Expand Up @@ -116,6 +116,8 @@ configuration: ## Section
#secret: 'change_me'
#bucket: 'my_photos'
#region: 'us-east-1'
#host: 's3.amazonaws.com'
#endpoint: 'https://s3.amazonaws.com'

## Use max-age header on Amazon S3 resources (default=true).
## When true, this allows locally cached images to be served for up to
Expand Down
5 changes: 4 additions & 1 deletion config/initializers/carrierwave.rb
Expand Up @@ -12,7 +12,10 @@
provider: 'AWS',
aws_access_key_id: AppConfig.environment.s3.key.get,
aws_secret_access_key: AppConfig.environment.s3.secret.get,
region: AppConfig.environment.s3.region.get
region: AppConfig.environment.s3.region.get,
host: AppConfig.environment.s3.host.get,
endpoint: AppConfig.environment.s3.endpoint.get,
path_style: true
}
if AppConfig.environment.s3.cache?
config.fog_attributes['Cache-Control'] = 'max-age=31536000'
Expand Down