feat(req-2080):不同环境路径配置自动化
This commit is contained in:
parent
0dbe8e3b5e
commit
6151b89200
@ -56,4 +56,10 @@ public class HuaWeiCloudObsConfig {
|
||||
*/
|
||||
@Value("${huaweicloud.checkpoint.encode-headers}")
|
||||
private String encodeHeaders;
|
||||
|
||||
/**
|
||||
* 是否开启请求头域自动编码
|
||||
*/
|
||||
@Value("${huaweicloud.profiles.active}")
|
||||
private String profilesActive;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ public class HuaWeiCloudServiceImpl implements HuaWeiCloudService {
|
||||
ObsClient obsClient = huaWeiCloudObsClient.getClient();
|
||||
|
||||
// 创建文件夹
|
||||
String objectKey = appCode + "/" + fileName;
|
||||
String objectKey = huaWeiCloudObsConfig.getProfilesActive() + "/" + appCode + "/" + fileName;
|
||||
try {
|
||||
if (APPCODE_CMS.equals(appCode)) {
|
||||
// 普通上传方式
|
||||
@ -91,7 +91,7 @@ public class HuaWeiCloudServiceImpl implements HuaWeiCloudService {
|
||||
ObsClient obsClient = huaWeiCloudObsClient.getClient();
|
||||
|
||||
// 创建文件夹
|
||||
String objectKey = appCode + "/" + fileName;
|
||||
String objectKey = huaWeiCloudObsConfig.getProfilesActive() + "/" + appCode + "/" + fileName;
|
||||
try {
|
||||
if (APPCODE_CMS.equals(appCode)) {
|
||||
// 断点续传
|
||||
@ -138,7 +138,7 @@ public class HuaWeiCloudServiceImpl implements HuaWeiCloudService {
|
||||
|
||||
ObsClient obsClient = huaWeiCloudObsClient.getClient();
|
||||
// 创建文件夹
|
||||
String objectKey = appCode + "/" + fileName;
|
||||
String objectKey = huaWeiCloudObsConfig.getProfilesActive() + "/" + appCode + "/" + fileName;
|
||||
|
||||
try {
|
||||
// 初始化分段上传任务
|
||||
|
||||
Loading…
Reference in New Issue
Block a user