Revision 961:5251072c02b6
| app/controllers/attachments_controller.rb | ||
|---|---|---|
| 49 | 49 |
end |
| 50 | 50 |
|
| 51 | 51 |
def download |
| 52 |
if @attachment.container.is_a?(Version) || @attachment.container.is_a?(Project)
|
|
| 53 |
@attachment.increment_download
|
|
| 54 |
end
|
|
| 52 |
# cc: formerly this happened only if "@attachment.container.is_a?(Version)"
|
|
| 53 |
# or Project. Not good for us, we want to tally all downloads
|
|
| 54 |
@attachment.increment_download
|
|
| 55 | 55 |
|
| 56 | 56 |
# images are sent inline |
| 57 | 57 |
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename), |
Also available in: Unified diff