Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: inline_uploads and subfolder #8076

Merged
merged 2 commits into from Sep 11, 2019

Conversation

@Supermathie
Copy link
Member

commented Sep 6, 2019

  • if subfolder, also look for images with a path containing
    cdn_url + relative_url_root
FIX: inline_uploads and subfolder
* if subfolder, also look for images with a path containing
  cdn_url + relative_url_root
@discoursebot

This comment has been minimized.

Copy link

commented Sep 6, 2019

You've signed the CLA, Supermathie. Thank you! This pull request is ready for review.

@eviltrout
Copy link
Member

left a comment

Seems good but it could use a spec?

regexps << /(#{cdn_url}\/uploads\/#{db}#{UPLOAD_REGEXP_PATTERN})/ if cdn_url
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?

This comment has been minimized.

Copy link
@eviltrout

eviltrout Sep 6, 2019

Member
Suggested change
regexps << /(#{cdn_url}#{GlobalSetting.relative_url_root}\/uploads\/#{db}#{UPLOAD_REGEXP_PATTERN})/ unless GlobalSetting.relative_url_root.nil?
regexps << /(#{cdn_url}#{GlobalSetting.relative_url_root}\/uploads\/#{db}#{UPLOAD_REGEXP_PATTERN})/ if GlobalSetting.relative_url_root.present?
@SamSaffron

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Agree we need a spec here, but the fixes are kind of urgent. Will see if I can sort this out.

@SamSaffron SamSaffron merged commit 503a11c into discourse:master Sep 11, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Tidelift Dependencies checked
Details

@Supermathie Supermathie deleted the Supermathie:inline_cdn_relative branch Sep 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.