Commit 651d1264 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'sh-carrierwave-patch-google-acl' into 'master'

Fix object storage not working properly with Google S3 compatibility

Closes #53846

See merge request gitlab-org/gitlab-ce!23858
parents 41a942be 79a091b1
......@@ -89,8 +89,9 @@ gem 'kaminari', '~> 1.0'
gem 'hamlit', '~> 2.8.8'
# Files attachments
# Locked until https://github.com/carrierwaveuploader/carrierwave/pull/2332/files is merged.
# config/initializers/carrierwave_patch.rb can be removed once that change is released.
# Locked until https://github.com/carrierwaveuploader/carrierwave/pull/2332 and
# https://github.com/carrierwaveuploader/carrierwave/pull/2356 are merged.
# config/initializers/carrierwave_patch.rb can be removed once both changes are released.
gem 'carrierwave', '= 1.2.3'
gem 'mini_magick'
......
---
title: Fix object storage not working properly with Google S3 compatibility
merge_request: 23858
author:
type: fixed
......@@ -23,6 +23,19 @@ module CarrierWave
end
end
end
# Fix for https://github.com/carrierwaveuploader/carrierwave/pull/2356
def acl_header
if fog_provider == 'AWS'
{ 'x-amz-acl' => @uploader.fog_public ? 'public-read' : 'private' }
else
{}
end
end
def fog_provider
@uploader.fog_credentials[:provider].to_s
end
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment