Skip to content
New issue

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

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

Already on GitHub? # to your account

{acl: 'public-read'} is hard-coded in CamaleonCmsAwsUploader, no way to change #955

Closed
texpert opened this issue May 30, 2020 · 2 comments
Closed

Comments

@texpert
Copy link
Collaborator

texpert commented May 30, 2020

Here it is - https://github.com/owen2345/camaleon-cms/blob/master/app/uploaders/camaleon_cms_aws_uploader.rb#L92

Sure I've worked it around by setting public read access to the bucket, but AWS is complaining of this and, indeed, this would be good to be configurable.

@owen2345
Copy link
Owner

owen2345 commented Jun 1, 2020

Hi @texpert
You can customize it using the hook "on_uploader", sample:

def my_hook_listener(settings)
  settings[:aws_settings][:aws_file_upload_settings] = lambda { |file_settings| file_settings.merge({ .. custom_file_settings })  }
end

BTW: Sorry for the bad code, the project is too too old.

@texpert
Copy link
Collaborator Author

texpert commented Jun 2, 2020

Thanks a lot, @owen2345 , worked like a charm!!

However, I have just discovered, that downloading of private files is possible only via presigned URL. Not a word about it in AWS docs, until I went to their forums :(

@texpert texpert closed this as completed Jun 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants