Fix broken file downloads

This commit is contained in:
rebuilt 2022-11-22 06:41:03 -08:00
parent a173740ded
commit f2089c2eeb
6 changed files with 9 additions and 3 deletions

View file

@ -2,4 +2,9 @@ class ResearchController < ApplicationController
def index
end
def download_pdf
send_file "#{Rails.root}/public/docs/#{params[:path]}.pdf", type: "application/pdf", x_sendfile: true
end
end