return super.putBlob(container, blob, options);
}
}
private String putBlobWithReducedRedundancy(String container, Blob blob) {
AWSS3PutObjectOptions options = new AWSS3PutObjectOptions();
try {
AccessControlList acl = bucketAcls.getUnchecked(container);
if (acl != null && acl.hasPermission(AccessControlList.GroupGranteeURI.ALL_USERS,
AccessControlList.Permission.READ)) {
options.withAcl(CannedAccessPolicy.PUBLIC_READ);
}
options.storageClass(ObjectMetadata.StorageClass.REDUCED_REDUNDANCY);
} catch (CacheLoader.InvalidCacheLoadException e) {
// nulls not permitted from cache loader
}
return getContext().unwrap(AWSS3ApiMetadata.CONTEXT_TOKEN).getApi().putObject(container, blob2Object.apply(blob),