Feature #10362 ยป show_repositories_image_inline.patch
| app/controllers/repositories_controller.rb (working copy) | ||
|---|---|---|
|
send_opt = { :filename => filename_for_content_disposition(@path.split('/').last) }
|
||
|
send_type = Redmine::MimeType.of(@path)
|
||
|
send_opt[:type] = send_type.to_s if send_type
|
||
|
send_opt[:disposition] = Redmine::MimeType.is_type?('image', @path) ?
|
||
|
'inline' : 'attachment'
|
||
|
send_data @content, send_opt
|
||
|
else
|
||
|
# Prevent empty lines when displaying a file with Windows style eol
|
||