fix 修复 新版上传未设置acl问题

2.X
疯狂的狮子Li 7 months ago
parent 22108cd60b
commit c9a1e67e5d

@ -178,6 +178,7 @@ public class OssClient {
.key(key) .key(key)
.contentMD5(StringUtils.isNotEmpty(md5Digest) ? md5Digest : null) .contentMD5(StringUtils.isNotEmpty(md5Digest) ? md5Digest : null)
.contentType(contentType) .contentType(contentType)
.acl(getAccessPolicy().getObjectCannedACL())
.build()) .build())
.addTransferListener(LoggingTransferListener.create()) .addTransferListener(LoggingTransferListener.create())
.source(filePath).build()); .source(filePath).build());
@ -223,6 +224,7 @@ public class OssClient {
y -> y.bucket(properties.getBucketName()) y -> y.bucket(properties.getBucketName())
.key(key) .key(key)
.contentType(contentType) .contentType(contentType)
.acl(getAccessPolicy().getObjectCannedACL())
.build()) .build())
.build()); .build());

Loading…
Cancel
Save