Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
UPHRH-lms-service
Commits
41077fc8
Unverified
Commit
41077fc8
authored
2 years ago
by
Reshmi V Nair
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #504 from BharathwajShankar/LR-278
LR-278 - File URL is not having new cname changes fix
parents
fda152b7
412856fc
master
bootcamp
helmchart
release-5.0.1
release-5.0.2
release-5.1.0
release-5.2.0
release-5.2.1
release-5.3.0
release-5.3.1
release-5.4.0
release-5.3.1_RC1
release-5.3.0_RC1
release-5.2.0_RC2
release-5.2.0_RC1
release-5.1.0_RC2
release-5.1.0_RC1
release-5.0.1_RC3
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
course-mw/course-actors-common/src/main/java/org/sunbird/learner/actors/qrcodedownload/QRCodeDownloadManagementActor.java
+8
-3
.../actors/qrcodedownload/QRCodeDownloadManagementActor.java
course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/java/org/sunbird/common/models/util/JsonKey.java
+3
-0
...src/main/java/org/sunbird/common/models/util/JsonKey.java
course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/resources/externalresource.properties
+2
-0
...ommon-util/src/main/resources/externalresource.properties
with
13 additions
and
3 deletions
+13
-3
course-mw/course-actors-common/src/main/java/org/sunbird/learner/actors/qrcodedownload/QRCodeDownloadManagementActor.java
+
8
−
3
View file @
41077fc8
...
@@ -233,10 +233,15 @@ public class QRCodeDownloadManagementActor extends BaseActor {
...
@@ -233,10 +233,15 @@ public class QRCodeDownloadManagementActor extends BaseActor {
List
<
Map
<
String
,
Object
>>
listOfMap
=
(
List
<
Map
<
String
,
Object
>>)
obj
;
List
<
Map
<
String
,
Object
>>
listOfMap
=
(
List
<
Map
<
String
,
Object
>>)
obj
;
if
(
CollectionUtils
.
isNotEmpty
(
listOfMap
))
{
if
(
CollectionUtils
.
isNotEmpty
(
listOfMap
))
{
//TODO Resolve it and store. Assuming dial code db will have the template url with data migration script
//TODO Resolve it and store. Assuming dial code db will have the template url with data migration script
//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"
);
String
templateUrl
=
(
String
)
listOfMap
.
get
(
0
).
get
(
"url"
);
//replace template url with the actual cloud url
String
dailStorageBasePath
=
getConfigValue
(
DIAL_STORAGE_BASE_PATH_PLACEHOLDER
);
if
(
templateUrl
.
contains
(
getConfigValue
(
CLOUD_STORE_BASE_PATH_PLACEHOLDER
)))
String
cnameUrl
=
getConfigValue
(
CLOUD_STORAGE_CNAME_URL
);
templateUrl
=
templateUrl
.
replace
(
getConfigValue
(
CLOUD_STORE_BASE_PATH_PLACEHOLDER
),
getConfigValue
(
CLOUD_STORE_BASE_PATH
));
if
(
templateUrl
.
contains
(
dailStorageBasePath
))
templateUrl
=
templateUrl
.
replace
(
dailStorageBasePath
,
cnameUrl
.
isEmpty
()
?
getConfigValue
(
CLOUD_STORE_BASE_PATH
)
:
cnameUrl
+
"/"
+
getConfigValue
(
CLOUD_STORAGE_DIAL_BUCKET_NAME
));
return
templateUrl
;
return
templateUrl
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/java/org/sunbird/common/models/util/JsonKey.java
+
3
−
0
View file @
41077fc8
...
@@ -789,6 +789,9 @@ public final class JsonKey {
...
@@ -789,6 +789,9 @@ public final class JsonKey {
public
static
final
String
CLOUD_FOLDER_CONTENT
=
"sunbird_cloud_content_folder"
;
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
=
"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
CLOUD_STORE_BASE_PATH_PLACEHOLDER
=
"cloud_store_base_path_placeholder"
;
public
static
final
String
TO_URL
=
"toUrl"
;
public
static
final
String
TO_URL
=
"toUrl"
;
public
static
final
String
TTL
=
"ttl"
;
public
static
final
String
TTL
=
"ttl"
;
...
...
This diff is collapsed.
Click to expand it.
course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/resources/externalresource.properties
+
2
−
0
View file @
41077fc8
...
@@ -207,4 +207,6 @@ sunbird_msg_91_auth=
...
@@ -207,4 +207,6 @@ sunbird_msg_91_auth=
sunbird_api_mgr_base_url
=
https://dev.sunbirded.org/api
sunbird_api_mgr_base_url
=
https://dev.sunbirded.org/api
enrollment_list_size
=
1000
enrollment_list_size
=
1000
cloud_storage_base_url
=
https://sunbirddev.blob.core.windows.net
cloud_storage_base_url
=
https://sunbirddev.blob.core.windows.net
cloud_storage_cname_url
=
https://obj.stage.sunbirded.org
cloud_storage_dial_bucketname
=
dial
cloud_store_base_path_placeholder
=
$CLOUD_BASE_PATH
cloud_store_base_path_placeholder
=
$CLOUD_BASE_PATH
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets