How to use uploaded file acl?
berkaytheunicorn opened this issue · 1 comments
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.
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).