feat():测试
parent
a71a996367
commit
769faff8eb
|
@ -100,7 +100,7 @@ public class OSSFileLoad {
|
||||||
System.out.println("bucket不存在");
|
System.out.println("bucket不存在");
|
||||||
return Result.error("bucket不存在");
|
return Result.error("bucket不存在");
|
||||||
}
|
}
|
||||||
Boolean flag_file = ossClient.doesObjectExist(bucketName, fileJavaPath+fileName+ MethodSuffix.CLASSSUFFIX);
|
Boolean flag_file = ossClient.doesObjectExist(bucketName, fileClassPath+fileName+ MethodSuffix.CLASSSUFFIX);
|
||||||
if (!flag_file) {
|
if (!flag_file) {
|
||||||
System.out.println("预下载文件不存在");
|
System.out.println("预下载文件不存在");
|
||||||
return Result.error("预下载文件不存在");
|
return Result.error("预下载文件不存在");
|
||||||
|
@ -110,7 +110,7 @@ public class OSSFileLoad {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 从OSS下载文件
|
// 从OSS下载文件
|
||||||
InputStream inputStream = ossClient.getObject(bucketName, fileJavaPath + fileName + MethodSuffix.CLASSSUFFIX).getObjectContent();
|
InputStream inputStream = ossClient.getObject(bucketName, fileClassPath + fileName + MethodSuffix.CLASSSUFFIX).getObjectContent();
|
||||||
File downloadFile = new File(localPath);
|
File downloadFile = new File(localPath);
|
||||||
FileOutputStream outputStream = new FileOutputStream(downloadFile);
|
FileOutputStream outputStream = new FileOutputStream(downloadFile);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue