Skip to content

Commit

Permalink
Companion 3 default to no s3 acl (transloadit#3826)
Browse files Browse the repository at this point in the history
* default to no ACL for s3

and remove no longer needed process.env.COMPANION_AWS_DISABLE_ACL

* fix what looks like a bug
  • Loading branch information
mifi committed Jun 27, 2022
1 parent 4f69af2 commit 6d75cb5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/config/companion.js
Expand Up @@ -10,7 +10,6 @@ const defaultOptions = {
},
providerOptions: {},
s3: {
acl: 'public-read', // todo default to no ACL in next major
endpoint: 'https://{service}.{region}.amazonaws.com',
conditions: [],
useAccelerateEndpoint: false,
Expand Down
1 change: 0 additions & 1 deletion src/server/Uploader.js
Expand Up @@ -638,7 +638,6 @@ class Uploader {
const params = {
Bucket: options.bucket,
Key: options.getKey(null, filename, this.options.metadata),
ACL: options.acl,
ContentType: this.options.metadata.type,
Metadata: this.options.metadata,
Body: stream,
Expand Down
2 changes: 1 addition & 1 deletion src/standalone/helper.js
Expand Up @@ -78,7 +78,7 @@ const getConfigFromEnv = () => {
useAccelerateEndpoint:
process.env.COMPANION_AWS_USE_ACCELERATE_ENDPOINT === 'true',
expires: parseInt(process.env.COMPANION_AWS_EXPIRES || '300', 10),
acl: process.env.COMPANION_AWS_DISABLE_ACL === 'true' ? null : (process.env.COMPANION_AWS_ACL || 'public-read'), // todo default to no ACL in next major and remove COMPANION_AWS_DISABLE_ACL
acl: process.env.COMPANION_AWS_ACL,
},
server: {
host: process.env.COMPANION_DOMAIN,
Expand Down

0 comments on commit 6d75cb5

Please sign in to comment.