From 0d4a3c62ab3036508ba1f38653580af80a4b631e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 18 Aug 2021 09:19:09 +0200 Subject: Set ACL when uploading objects --- server/lib/object-storage/shared/object-storage-helpers.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/lib/object-storage/shared/object-storage-helpers.ts b/server/lib/object-storage/shared/object-storage-helpers.ts index e23216907..b53b94b96 100644 --- a/server/lib/object-storage/shared/object-storage-helpers.ts +++ b/server/lib/object-storage/shared/object-storage-helpers.ts @@ -146,7 +146,8 @@ async function objectStoragePut (options: { const command = new PutObjectCommand({ Bucket: bucketInfo.BUCKET_NAME, Key: buildKey(objectStorageKey, bucketInfo), - Body: content + Body: content, + ACL: 'public-read' }) await getClient().send(command) @@ -168,7 +169,8 @@ async function multiPartUpload (options: { const createMultipartCommand = new CreateMultipartUploadCommand({ Bucket: bucketInfo.BUCKET_NAME, - Key: key + Key: key, + ACL: 'public-read' }) const createResponse = await s3Client.send(createMultipartCommand) -- cgit v1.2.3