aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/object-storage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-18 09:19:09 +0200
committerChocobozzz <me@florianbigard.com>2021-08-18 09:19:09 +0200
commit0d4a3c62ab3036508ba1f38653580af80a4b631e (patch)
tree8806a9b86913774bc848eb477817752c1f172d88 /server/lib/object-storage
parent1f6125be8b6306ba34b5ad9df985df462ef9759c (diff)
downloadPeerTube-0d4a3c62ab3036508ba1f38653580af80a4b631e.tar.gz
PeerTube-0d4a3c62ab3036508ba1f38653580af80a4b631e.tar.zst
PeerTube-0d4a3c62ab3036508ba1f38653580af80a4b631e.zip
Set ACL when uploading objects
Diffstat (limited to 'server/lib/object-storage')
-rw-r--r--server/lib/object-storage/shared/object-storage-helpers.ts6
1 files 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: {
146 const command = new PutObjectCommand({ 146 const command = new PutObjectCommand({
147 Bucket: bucketInfo.BUCKET_NAME, 147 Bucket: bucketInfo.BUCKET_NAME,
148 Key: buildKey(objectStorageKey, bucketInfo), 148 Key: buildKey(objectStorageKey, bucketInfo),
149 Body: content 149 Body: content,
150 ACL: 'public-read'
150 }) 151 })
151 152
152 await getClient().send(command) 153 await getClient().send(command)
@@ -168,7 +169,8 @@ async function multiPartUpload (options: {
168 169
169 const createMultipartCommand = new CreateMultipartUploadCommand({ 170 const createMultipartCommand = new CreateMultipartUploadCommand({
170 Bucket: bucketInfo.BUCKET_NAME, 171 Bucket: bucketInfo.BUCKET_NAME,
171 Key: key 172 Key: key,
173 ACL: 'public-read'
172 }) 174 })
173 const createResponse = await s3Client.send(createMultipartCommand) 175 const createResponse = await s3Client.send(createMultipartCommand)
174 176