Displaying 1 result from an estimated 1 matches for "document_file_nam".
Did you mean:
document_file_name
2014 Mar 26
0
Heroku | Rails 4 | Ruby 2.0 - send_file not presenting file for download in the browser
...figure out what I may be doing incorrectly.
Here is what I currently have:
app/controllers/blog_attachments.rb
before_action :set_blog_attachment, only: [:download]
def download
download_file(@blog_attachment)
send_file("#{Rails.root}/public/blog_attachments/#{@blog_attachment.document_file_name}",
filename: @blog_attachment.document_file_name,
type: @blog_attachment.document_content_type,
stream: true,
disposition: 'inline')
respond_to do |format|
format.js {}
end
end
private
def download_file(f...