Project

General

Profile

[PATCH] Show images in repositories inline when you click... ยป show_repositories_image_inline.patch

Hiroaki Nakamura, 2012-03-04 04:27

View differences:

app/controllers/repositories_controller.rb (working copy)
145 145
      send_opt = { :filename => filename_for_content_disposition(@path.split('/').last) }
146 146
      send_type = Redmine::MimeType.of(@path)
147 147
      send_opt[:type] = send_type.to_s if send_type
148
      send_opt[:disposition] = Redmine::MimeType.is_type?('image', @path) ?
149
                               'inline' : 'attachment'
148 150
      send_data @content, send_opt
149 151
    else
150 152
      # Prevent empty lines when displaying a file with Windows style eol
    (1-1/1)