Project

General

Profile

Feature #33902 ยป inline_attachment_images.patch

Not a Bug, it's a Feature - der gl0wn, 2020-08-25 11:23

View differences:

inline_attachment_images.rb 2020-08-25 08:46:12.000000000 +0200
1
  def disposition(attachment)
1
module InlineAttachmentImages
2
  private def disposition(attachment)
2 3
    if attachment.is_pdf?
3 4
      'inline'
5
    elsif attachment.is_image?
6
      'inline'
4 7
    else
5 8
      'attachment'
6 9
    end
7 10
  end
11
end
12

  
13
require_dependency 'attachments_controller'
14
class ::AttachmentsController
15
  prepend InlineAttachmentImages
16
end
    (1-1/1)