Simone
07/26/2023, 9:31 PMany function createNewBucket(clientID='100',secure="0",location="USA") {
var messages = [];
try {
var bucket_Name = arguments.secure eq 1 ? 's3-'&arguments.clientID&'-secure-files' : 's3-'&arguments.clientID&'-files';
var checkBucket = hasBucket(bucket_Name);
var loc = getLocations(arguments.location);
if (!checkBucket) {
createBucket = putBucket(bucketName=bucket_Name,location=loc);
if (createBucket ) {
arrayAppend(messages, 'Bucket Created Successsfully');
} else {
arrayAppend(messages, 'Bucket not Created');
}
}
}
catch(any cfcatch) {
arrayAppend(messages, '#cfcatch.message#');
}
return messages;
}
whe it creates the Bucket, it has the following issues:
1. The "Block public access" is being set "On"
2. The "Object Ownership" is being set to "ACL's disabled", but i need it to have ACL enabled and the object ownership as: onjectwriter
what information i am missing here, please suggest