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

How to use uploaded file acl? #169

Open
berkaytheunicorn opened this issue Dec 25, 2018 · 1 comment
Open

How to use uploaded file acl? #169

berkaytheunicorn opened this issue Dec 25, 2018 · 1 comment

Comments

@berkaytheunicorn
Copy link

I can't figured it out how can I keep uploaded files acl rules.

example:

If file uploaded with private/public-read, generated images should be private/public-read

I have no acl settings in my config and all generated files will have private acl.

@ysugimoto
Copy link
Owner

I think you can do it with a couple of ways:

One is use fixed ACL setting in config.json. We have ACL configuration in all three of backup , reduce, and resize. See: https://github.com/ysugimoto/aws-lambda-image#configuration-parameters

The other is to get an original ACL from event object. But unfortunately putObject event won't pass image's ACL setting in event structure (https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html). So if you want to do it, you need to write some additional code to get original ACL info by calling getObjectAcl before start to process this function (here).

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

2 participants