Use short upload URL in import scripts

This commit is contained in:
Gerhard Schlager 2018-06-17 22:56:14 +02:00
parent 88ca838e02
commit 3f167ae5ce
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,8 @@ module ImportScripts
def embedded_image_html(upload)
image_width = [upload.width, SiteSetting.max_image_width].compact.min
image_height = [upload.height, SiteSetting.max_image_height].compact.min
%Q[<img src="#{upload.url}" width="#{image_width}" height="#{image_height}"><br/>]
upload_name = upload.short_url || upload.url
%Q~![#{upload.original_filename}|#{image_width}x#{image_height}](#{upload_name})~
end
def attachment_html(upload, display_filename)