I don’t know why this isn’t working. If I download a word doc that I
uploaded, all I get is the S3 file path in the document. If I access
the s3 file path directly in my browser, it downloads the file
correctly.
Here is my controller method:
def download
@curriculum = @school.curriculums.find(params[:id])
send_data @curriculum.attachment.public_filename,
:filename => @curriculum.attachment.filename,
:type => @curriculum.attachment.content_type
end
view:
link_to curriculum.attachment.filename.split(’.’).first, :action =>
‘download’, :id => curriculum.id
The file is downloaded, but not the file content. Thanks for any help!