Browse Source

预览文档验证桶名是否存在

陈长荣 2 months ago
parent
commit
1dc8d74c21

+ 1 - 1
src/main/java/com/github/jfcloud/excel/editor/docdeal/oss/service/OssTemplate.java

@@ -74,7 +74,7 @@ public class OssTemplate {
     }
 
     public boolean exist(String bucketName, String objectName) {
-        return amazonS3.doesObjectExist(bucketName, objectName);
+        return amazonS3.doesBucketExistV2(bucketName) && amazonS3.doesObjectExist(bucketName, objectName);
     }
 
     public S3Object getObject(String bucketName, String objectName) {