mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Merge pull request #4279 from scossar/s3cdn-upload-location
FIX: get urlWithCDN before appending protocol
This commit is contained in:
commit
7a4c3af29d
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