Skip to content
Snippets Groups Projects
Unverified Commit 353f9108 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

wip uploads url

parent 6c8445a6
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,11 @@ class Communication::Website < ApplicationRecord
end
def domain_url
"https://#{ domain }"
"https://#{domain}"
end
def uploads_url
"#{domain_url}/wp-content/uploads"
end
def import!
......
......@@ -5,7 +5,7 @@ module Communication::Website::Imported::WithRichText
def rich_text_with_attachments(text)
fragment = Nokogiri::HTML.fragment(text)
images = fragment.css("img[src*=\"#{website.website.domain_url}\"]")
images = fragment.css("img[src*=\"#{website.website.uploads_url}\"]")
images.each do |image|
begin
url = image.attr('src')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment