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

asset_host_public configuration is missing from the README.md #181

Open
peterpengnz opened this issue Nov 10, 2024 · 0 comments
Open

asset_host_public configuration is missing from the README.md #181

peterpengnz opened this issue Nov 10, 2024 · 0 comments

Comments

@peterpengnz
Copy link

Hi

We have a scenario that we need to serve uploaded images as public URL.
With our current S3 bucket ACL setting, we couldn't use the aws_acl configuration option.
However, when I read the code here:

def url(options = {})
if signer
signed_url(options)
elsif public?
public_url
else
authenticated_url(options)
end
end

I found I could use asset_host_public configuration option to ensure the public? method returns true -- this is the desired result we needed. However, I couldn't find the documentation about this option in the README.md.

def public?
uploader.aws_acl.to_s == 'public-read' || uploader.asset_host_public
end

I can see it in the CHANGELOG.md where indicate this configuration option is fixed in Version 1.5.0 on 2020-04-01

Just checking, is this option just missed out from the documentation or is there any side-effect to use this "hidden" configuration?

Thanks
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant