Commit 00c11765 authored by BharathwajShankar's avatar BharathwajShankar
Browse files

LR-278 - CLONE - File URL is not having new cname changes fix

Showing with 7 additions and 2 deletions
+7 -2
......@@ -235,8 +235,8 @@ public class QRCodeDownloadManagementActor extends BaseActor {
//TODO Resolve it and store. Assuming dial code db will have the template url with data migration script
String templateUrl = (String) listOfMap.get(0).get("url");
//replace template url with the actual cloud url
if (templateUrl.contains(getConfigValue(CLOUD_STORE_BASE_PATH_PLACEHOLDER)))
templateUrl = templateUrl.replace(getConfigValue(CLOUD_STORE_BASE_PATH_PLACEHOLDER), getConfigValue(CLOUD_STORE_BASE_PATH));
if (templateUrl.contains(getConfigValue(DIAL_STORAGE_BASE_PATH)))
templateUrl = templateUrl.replace(getConfigValue(DIAL_STORAGE_BASE_PATH), getConfigValue(CLOUD_STORE_BASE_PATH));
return templateUrl;
}
}
......
......@@ -3,6 +3,8 @@ package org.sunbird.common.models.util;
import java.util.Arrays;
import java.util.List;
import static org.sunbird.common.models.util.ProjectUtil.getConfigValue;
/**
* This class will contains all the key related to request and response.
*
......@@ -790,6 +792,8 @@ 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_STORE_BASE_PATH_PLACEHOLDER = "cloud_store_base_path_placeholder";
public static final String DIAL_STORAGE_BASE_PATH = getConfigValue("cloud_storage_base_url") +"/"+
getConfigValue("cloud_storage_dial_bucketname");
public static final String TO_URL = "toUrl";
public static final String TTL = "ttl";
public static final String TEXTBOOK_TOC_CSV_TTL = "sunbird_texbook_toc_csv_ttl";
......
......@@ -207,4 +207,5 @@ sunbird_msg_91_auth=
sunbird_api_mgr_base_url=https://dev.sunbirded.org/api
enrollment_list_size=1000
cloud_storage_base_url=https://sunbirddev.blob.core.windows.net
cloud_storage_dial_bucketname=dial
cloud_store_base_path_placeholder=$CLOUD_BASE_PATH
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment