Use short upload URL in import scripts
This commit is contained in:
parent
88ca838e02
commit
3f167ae5ce
|
@ -48,7 +48,8 @@ module ImportScripts
|
||||||
def embedded_image_html(upload)
|
def embedded_image_html(upload)
|
||||||
image_width = [upload.width, SiteSetting.max_image_width].compact.min
|
image_width = [upload.width, SiteSetting.max_image_width].compact.min
|
||||||
image_height = [upload.height, SiteSetting.max_image_height].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
|
end
|
||||||
|
|
||||||
def attachment_html(upload, display_filename)
|
def attachment_html(upload, display_filename)
|
||||||
|
|
Loading…
Reference in New Issue