mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
parent
2ba4de2d45
commit
fd12c414e7
6 changed files with 43 additions and 39 deletions
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'url_helper'
|
||||
require_dependency 'discourse_markdown'
|
||||
require_dependency 'upload_markdown'
|
||||
|
||||
module ImportScripts
|
||||
class Uploader
|
||||
|
@ -40,15 +40,15 @@ module ImportScripts
|
|||
end
|
||||
|
||||
def html_for_upload(upload, display_filename)
|
||||
DiscourseMarkdown.upload_markdown(upload, display_name: display_filename)
|
||||
UploadMarkdown.new(upload).to_markdown(display_name: display_filename)
|
||||
end
|
||||
|
||||
def embedded_image_html(upload)
|
||||
DiscourseMarkdown.image_markdown(upload)
|
||||
UploadMarkdown.new(upload).image_markdown
|
||||
end
|
||||
|
||||
def attachment_html(upload, display_filename)
|
||||
DiscourseMarkdown.attachment_markdown(upload, display_name: display_filename)
|
||||
UploadMarkdown.new(upload).attachment_markdown(display_name: display_filename)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue