:bug:紧急修复多个对象存储上传失败问题

This commit is contained in:
hello-hao
2022-02-16 16:53:31 +08:00
parent 6df3267b18
commit 43cfc832a8
6 changed files with 20 additions and 21 deletions
@@ -58,13 +58,13 @@ public class NOSImageupload {
&& !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ){
// 初始化
Credentials credentials = new BasicCredentials(k.getAccessKey(), k.getAccessSecret());
NosClient nosClient = new NosClient(credentials);
nosClient.setEndpoint(k.getEndpoint());
NosClient nosObj = new NosClient(credentials);
nosObj.setEndpoint(k.getEndpoint());
ObjectListing objectListing = null;
try {
objectListing = nosClient.listObjects(k.getBucketname());
objectListing = nosObj.listObjects(k.getBucketname());
ret = 1;
nosClient = nosClient;
nosClient = nosObj;
key = k;
}catch (Exception e){
System.out.println("NOS Object Is null");