Project

General

Profile

Feature #10362 ยป show_repositories_image_inline.patch

Hiroaki Nakamura, 2012-03-04 08:03

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)