feat():测试

yuan
yuan 2024-08-31 23:17:50 +08:00
parent b8dfe7283a
commit d2dc0008fa
1 changed files with 2 additions and 0 deletions

View File

@ -35,11 +35,13 @@ public class OSSFileLoad {
// 判断 bucket 是否存在
Boolean flag_bucket = ossClient.doesBucketExist(bucketName);
if (!flag_bucket) {
System.out.println("bucket不存在");
return Result.error("bucket不存在");
}
// 判断 要下载的文件 是否存在
Boolean flag_file = ossClient.doesObjectExist(bucketName, fileName);
if (!flag_file) {
System.out.println("预下载文件不存在");
return Result.error("预下载文件不存在");
}
// ossObject包含文件所在的存储空间名称、文件名称、文件元信息以及一个输入流