feat(store-s3): add optional ACL option for uploads #810
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
The relevant store-s3 options for Indiekit usage:
"acl": "public-read"- Photos accessible via direct URLacl- 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.jsonon 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 likenpm linkbut I don't know what I'm doing. 🥲Can someone help review if the changes made to the
packages/store-s3/index.jsis 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