Defect #20277 » redmine#20277.patch
| app/controllers/attachments_controller.rb Mon Oct 10 07:48:13 2016 +0000 → app/controllers/attachments_controller.rb Mon Dec 05 10:21:04 2016 +0100 | ||
|---|---|---|
|
@attachment.increment_download
|
||
|
end
|
||
|
if stale?(:etag => @attachment.digest)
|
||
|
if stale?(:etag => @attachment.digest, :template => false)
|
||
|
# images are sent inline
|
||
|
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
|
||
|
:type => detect_content_type(@attachment),
|
||
| ... | ... | |
|
def thumbnail
|
||
|
if @attachment.thumbnailable? && tbnail = @attachment.thumbnail(:size => params[:size])
|
||
|
if stale?(:etag => tbnail)
|
||
|
if stale?(:etag => tbnail, :template => false)
|
||
|
send_file tbnail,
|
||
|
:filename => filename_for_content_disposition(@attachment.filename),
|
||
|
:type => detect_content_type(@attachment),
|
||