@@ -39,7 +39,7 class DocumentsController < ApplicationController | |||
|
39 | 39 | def download |
|
40 | 40 | @attachment = @document.attachments.find(params[:attachment_id]) |
|
41 | 41 | @attachment.increment_download |
|
42 | send_file @attachment.diskfile, :filename => @attachment.filename | |
|
42 | send_file @attachment.diskfile, :filename => @attachment.filename, :type => @attachment.content_type | |
|
43 | 43 | rescue |
|
44 | 44 | render_404 |
|
45 | 45 | end |
@@ -39,7 +39,7 class VersionsController < ApplicationController | |||
|
39 | 39 | def download |
|
40 | 40 | @attachment = @version.attachments.find(params[:attachment_id]) |
|
41 | 41 | @attachment.increment_download |
|
42 | send_file @attachment.diskfile, :filename => @attachment.filename | |
|
42 | send_file @attachment.diskfile, :filename => @attachment.filename, :type => @attachment.content_type | |
|
43 | 43 | rescue |
|
44 | 44 | render_404 |
|
45 | 45 | end |
General Comments 0
You need to be logged in to leave comments.
Login now