mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
Rename FileHelper.is_image? -> FileHelper.is_supported_image?.
This commit is contained in:
@@ -11,7 +11,7 @@ Upload.where("lower(extension) in (?)", ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'ti
|
||||
count += 1
|
||||
print "\r%8d".freeze % count
|
||||
absolute_path = Discourse.store.path_for(upload)
|
||||
if absolute_path && FileHelper.is_image?(upload.original_filename)
|
||||
if absolute_path && FileHelper.is_supported_image?(upload.original_filename)
|
||||
file = File.new(absolute_path) rescue nil
|
||||
next unless file
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ module ImportScripts
|
||||
end
|
||||
|
||||
def html_for_upload(upload, display_filename)
|
||||
if FileHelper.is_image?(upload.url)
|
||||
if FileHelper.is_supported_image?(upload.url)
|
||||
embedded_image_html(upload)
|
||||
else
|
||||
attachment_html(upload, display_filename)
|
||||
|
||||
Reference in New Issue
Block a user