mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
get urlWithCDN before appending protocol
This commit is contained in:
parent
2720205f78
commit
9bf381b95c
1 changed files with 2 additions and 1 deletions
|
@ -251,7 +251,8 @@ Discourse.Utilities = {
|
|||
|
||||
uploadLocation: function(url) {
|
||||
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) {
|
||||
return 'https:' + url;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue