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)
1.4m articles
1.4m replys
5 comments
57.0k users