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

feat(dl-center): add support for arbitrary acls COMPASS-9237 #525

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

drichmdb
Copy link
Contributor

@drichmdb drichmdb commented Apr 1, 2025

This commit adjusts our DownloadCenter's UploadAssetOptions to support taking an optional 'acl' parameter. When we upload an asset to S3, this parameter is used to set the ACL on the put request. If no acl is set, we default to "public-read" to preserve backward compatibility.

@drichmdb drichmdb requested a review from lerouxb April 1, 2025 14:24
@@ -235,8 +236,10 @@ export class DownloadCenter {
throw new Error('s3ObjectKey is required');
}

const acl = options.acl === undefined ? ACL_PUBLIC_READ : options.acl;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const acl = options.acl ?? ACL_PUBLIC_READ; should work and be more modern/idiomatic.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, obviously. Feel free to ignore ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

This commit adjusts our DownloadCenter's UploadAssetOptions to support
taking an optional 'acl' parameter. When we upload an asset to S3,
this parameter is used to set the ACL on the put request. If no acl is
set, we default to "public-read" to preserve backward compatibility.
@drichmdb drichmdb merged commit 8cd7ecc into main Apr 1, 2025
6 checks passed
@drichmdb drichmdb deleted the COMPASS-9237 branch April 1, 2025 15:18
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.

None yet

2 participants