get urlWithCDN before appending protocol

This commit is contained in:
scossar 2016-06-20 14:03:24 -07:00
parent 2720205f78
commit 9bf381b95c

View file

@ -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 {