use of com.zhouzifei.tool.common.upaiyun.UpaiManager in project simpleFS by shengdingbox.
the class UpaiyunOssApiClient method init.
@Override
public UpaiyunOssApiClient init(FileProperties fileProperties) {
final UpaiFileProperties upaiFileProperties = fileProperties.getUpai();
String userName = upaiFileProperties.getUserName();
String passWord = upaiFileProperties.getPassWord();
String url = upaiFileProperties.getUrl();
String bucketName = upaiFileProperties.getBucketName();
checkDomainUrl(url);
if (StringUtils.isNullOrEmpty(userName) || StringUtils.isNullOrEmpty(passWord) || StringUtils.isNullOrEmpty(bucketName)) {
throw new ServiceException("[" + this.storageType + "]尚未配置又拍云,文件上传功能暂时不可用!");
}
upaiManager = new UpaiManager(bucketName, userName, passWord);
return this;
}
Aggregations