diff --git a/course-mw/course-actors-common/src/main/java/org/sunbird/learner/actors/qrcodedownload/QRCodeDownloadManagementActor.java b/course-mw/course-actors-common/src/main/java/org/sunbird/learner/actors/qrcodedownload/QRCodeDownloadManagementActor.java index 17675b4aea2168592515071f22f9471cfaaca7cf..bef4d34208da4a805d4448fded8d082da843a462 100644 --- a/course-mw/course-actors-common/src/main/java/org/sunbird/learner/actors/qrcodedownload/QRCodeDownloadManagementActor.java +++ b/course-mw/course-actors-common/src/main/java/org/sunbird/learner/actors/qrcodedownload/QRCodeDownloadManagementActor.java @@ -236,9 +236,11 @@ public class QRCodeDownloadManagementActor extends BaseActor { //check if template url contains dail storage base path,if yes then append it with cnameurl and dial bucket name String templateUrl = (String) listOfMap.get(0).get("url"); - if (templateUrl.contains(getConfigValue(DIAL_STORAGE_BASE_PATH_PLACEHOLDER))) - templateUrl = templateUrl.replace(getConfigValue(DIAL_STORAGE_BASE_PATH_PLACEHOLDER), - getConfigValue(CLOUD_STORAGE_CNAME_URL).isEmpty() ? getConfigValue(CLOUD_STORE_BASE_PATH) : getConfigValue(CLOUD_STORAGE_CNAME_URL) + String dailStorageBasePath = getConfigValue(DIAL_STORAGE_BASE_PATH_PLACEHOLDER); + String cnameUrl = getConfigValue(CLOUD_STORAGE_CNAME_URL); + if (templateUrl.contains(dailStorageBasePath)) + templateUrl = templateUrl.replace(dailStorageBasePath, + cnameUrl.isEmpty() ? getConfigValue(CLOUD_STORE_BASE_PATH) :cnameUrl + "/" + getConfigValue(CLOUD_STORAGE_DIAL_BUCKET_NAME)); return templateUrl; } diff --git a/course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/java/org/sunbird/common/models/util/JsonKey.java b/course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/java/org/sunbird/common/models/util/JsonKey.java index 8bcf049c100137d02f1a757d0d22b1e7900a1adc..bcc9ea43a0c44f70812e671f930a864e812ac6e2 100644 --- a/course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/java/org/sunbird/common/models/util/JsonKey.java +++ b/course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/java/org/sunbird/common/models/util/JsonKey.java @@ -789,13 +789,9 @@ public final class JsonKey { public static final String CLOUD_FOLDER_CONTENT = "sunbird_cloud_content_folder"; public static final String CLOUD_STORE_BASE_PATH = "cloud_storage_base_url"; - public static final String CLOUD_STORAGE_CNAME_URL= "cloud_storage_cname_url"; - public static final String CLOUD_STORAGE_DIAL_BUCKET_NAME = "cloud_storage_dial_bucketname"; - public static final String DIAL_STORAGE_BASE_PATH_PLACEHOLDER="DIAL_STORAGE_BASE_PATH"; - public static final String CLOUD_STORE_BASE_PATH_PLACEHOLDER = "cloud_store_base_path_placeholder"; public static final String TO_URL = "toUrl"; public static final String TTL = "ttl";