jcaddel/maven-s3-wagon — Issue #1: permissions support
Author: carrot-garden
Created: 2011-12-31 04:25:16+00:00
State: open

hi;

do you think it is feasible to add support for full range of permissions?
currently you have only "public"

request.setCannedAcl(CannedAccessControlList.PublicRead);

see

com.amazonaws.services.s3.model.CannedAccessControlList

thanks.

/**
* Create a PutObjectRequest based on the source file and destination passed in
*/
protected PutObjectRequest getPutObjectRequest(File source, String destination, TransferProgress progress) {
try {
String key = getNormalizedKey(source, destination);
String bucketName = bucket.getName();
InputStream input = getInputStream(source, progress);
ObjectMetadata metadata = getObjectMetadata(source, destination);
PutObjectRequest request = new PutObjectRequest(bucketName, key, input, metadata);
request.setCannedAcl(CannedAccessControlList.PublicRead);
return request;
} catch (FileNotFoundException e) {
throw new AmazonServiceException("File not found", e);
}
}