DEV: improve subfolder inline logic

This follows up on #503a11cc88f with a spec
This commit is contained in:
Sam Saffron
2019-09-11 12:02:42 +10:00
parent 503a11cc88
commit 93b0ffc85c
2 changed files with 8 additions and 2 deletions

View File

@@ -284,7 +284,10 @@ class InlineUploads
if cdn_url
regexps << /(#{cdn_url}\/uploads\/#{db}#{UPLOAD_REGEXP_PATTERN})/
regexps << /(#{cdn_url}#{GlobalSetting.relative_url_root}\/uploads\/#{db}#{UPLOAD_REGEXP_PATTERN})/ unless GlobalSetting.relative_url_root.nil?
if GlobalSetting.relative_url_root.present?
regexps << /(#{cdn_url}#{GlobalSetting.relative_url_root}\/uploads\/#{db}#{UPLOAD_REGEXP_PATTERN})/
end
end
if Discourse.store.external?