Skip to content

Conversation

@eclecticpassions
Copy link

Re: #809

Add an access control list (ACL) option for @indiekit/store-s3 when uploading files to S3 storage.

This allows setting ACL (e.g. to public-read) for each object uploaded using S3 providers via Indiekit that doesn't support global bucket policies for Object Storage. (In my case, it's OVH S3 Object Storage.)

It will allow users to add the acl option to their Indiekit config:

  "@indiekit/store-s3": {
    "region": "some-region",
    "bucket": "myBucket",
    ...
    "acl": "public-read" 
  }

The relevant store-s3 options for Indiekit usage:

  • "acl": "public-read" - Photos accessible via direct URL
  • Omit acl - Uses bucket default (if bucket already supports public-read)

I am new to npm projects, I don't know how to test my changes made to the forked project code on my own Indiekit server running on Render. I tried added the forked repo SSH url to the package.json on my server repo under "dependencies": {"@indiekit/indiekit": "^1.0.0-beta.24" like {"@indiekit/indiekit":"git@github.com:eclecticpassions/indiekit.git" but it doesn't work. I tried using commands like npm link but I don't know what I'm doing. 🥲

Can someone help review if the changes made to the packages/store-s3/index.js is valid and works? Thanks so much. If it does, I'll update the docs page for the store-s3 plugin with the new option.

Relevant links:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl

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

Successfully merging this pull request may close these issues.

1 participant