How do you make an S3 object public via the AWS Java SDK?
Specifically, what API methods via the Java AWS SDK can be used to make an Object public when its uploaded?
Found the answer in an amazon aws forum.
return s3Client.putObject( new PutObjectRequest(bucketName, objectKey, inputStream, metadata) .withCannedAcl(CannedAccessControlList.PublicRead));
The answer being
.withCannedAcl(CannedAccessControlList.PublicRead)
2.1m questions
2.1m answers
60 comments
57.0k users