Add ability to directly configure the S3 ACL #420
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the only mechanism to control the permissions of objects in S3 is via the
config.fog_public
option, which is somewhat limited.This PR creates the
AssetSync.config.aws_acl
option, which allows the S3 Access Control List for uploaded objects to be set to specific values.Depending on the situation, setting these more specific values can be quite useful. For instance,
config.aws_acl = 'bucket-owner-full-control'
is used in some situations to ensure that the file uploaded is accessible by the bucket's owner, which may differ from the uploader.We need this option as the account we are uploading from is different to that which owns the bucket, so we must ensure these ACL permissions are correctly set.
Setting this config value will override the
AssetSync.config.fog_public
setting if set, as it is more specific.