I am have an app that is hosted on heroku (rails 4 | ruby 2.0) that I am
using paperclip-dropbox to upload attachments to a blog. I have created
a download link for people who read the blog to be able to download the
attachments but I am not able to get the file to actually download via
the browser. I am curious if anyone knows what could be the issue.
My process is I download the file locally, using HTTParty.get, to
public/images and then attempt to present the file to the user to
download. Getting the file to download is working without issue. But
getting the browser to present the file is my problem.
I am looking for any help on what I could do to figure out what I may be
Here is what I currently have:
before_action :set_blog_attachment, only: [:download]
respond_to do |format|
Use callbacks to share common setup or constraints between actions.
@blog_attachment = BlogAttachment.find(params[:id])
Never trust parameters from the scary internet, only allow the white
<% for attachment in @blog.blog_attachments %>
<%= link_to attachment.document_file_name,
download_blog_attachments_path(id: attachment.id), remote: true, method:
<% end %>
Any help is greatly appreciated.