Merge pull request #4279 from scossar/s3cdn-upload-location

FIX: get urlWithCDN before appending protocol
This commit is contained in:
Sam 2016-06-29 12:18:44 +10:00 committed by GitHub
commit 7a4c3af29d
1 changed files with 2 additions and 1 deletions

View File

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