1
0
Fork 0

Set ACL when uploading objects

This commit is contained in:
Chocobozzz 2021-08-18 09:19:09 +02:00
parent 1f6125be8b
commit 0d4a3c62ab
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -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)