Merge pull request #4279 from scossar/s3cdn-upload-location
FIX: get urlWithCDN before appending protocol
This commit is contained in:
commit
7a4c3af29d
|
@ -251,7 +251,8 @@ Discourse.Utilities = {
|
||||||
|
|
||||||
uploadLocation: function(url) {
|
uploadLocation: function(url) {
|
||||||
if (Discourse.CDN) {
|
if (Discourse.CDN) {
|
||||||
return Discourse.CDN.startsWith('//') ? "http:" + Discourse.getURLWithCDN(url) : Discourse.getURLWithCDN(url);
|
url = Discourse.getURLWithCDN(url);
|
||||||
|
return url.startsWith('//') ? 'http:' + url : url;
|
||||||
} else if (Discourse.SiteSettings.enable_s3_uploads) {
|
} else if (Discourse.SiteSettings.enable_s3_uploads) {
|
||||||
return 'https:' + url;
|
return 'https:' + url;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue