Defect #20277 » 20277-v2.patch
| app/controllers/attachments_controller.rb | ||
|---|---|---|
| 70 | 70 |
@attachment.increment_download |
| 71 | 71 |
end |
| 72 | 72 | |
| 73 |
if stale?(:etag => @attachment.digest) |
|
| 73 |
if stale?(:etag => @attachment.digest, :template => false)
|
|
| 74 | 74 |
# images are sent inline |
| 75 | 75 |
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename), |
| 76 | 76 |
:type => detect_content_type(@attachment), |
| ... | ... | |
| 80 | 80 | |
| 81 | 81 |
def thumbnail |
| 82 | 82 |
if @attachment.thumbnailable? && tbnail = @attachment.thumbnail(:size => params[:size]) |
| 83 |
if stale?(:etag => tbnail) |
|
| 83 |
if stale?(:etag => tbnail, :template => false)
|
|
| 84 | 84 |
send_file( |
| 85 | 85 |
tbnail, |
| 86 | 86 |
:filename => filename_for_content_disposition(@attachment.filename), |
- « Previous
- 1
- 2
- Next »