public String uploadObjectOSS(MultipartFile file, ImageVEntity isImage) {
updateAliyunSettingRedis("aliyun");
{}",endpoint,accessKeyId,accessKeySecret);
OSSClient client=new OSSClient(endpoint, accessKeyId, accessKeySecret);
isBucket(client);
try {
client.setBucketAcl(bucketName, CannedAccessControlList.PublicRead);
PutObjectResult result = client.putObject(bucketName, isImage.getUrl(), file.getInputStream());
if (result != null) {
return isImage.getUrl();
}
} catch (Exception e) {
log.error("上传文件至OSS[异常]",e);
} finally {
client.shutdown();
}
return null;
}