diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 867ef4c..84b351f 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -231,7 +231,11 @@ class ArchivesController < ApplicationController else user_agent = request.user_agent.downcase @escaped_file_name = user_agent.match(/(msie|trident)/) ? CGI::escape(@filename) : @filename - send_file(@path, :type=>"application/octet-stream", :filename => @escaped_file_name, :x_sendfile=> true) + if @ext == "pdf" + send_file(@path, :type => "application/pdf", :disposition => "inline", :filename => @escaped_file_name, :x_sendfile => true) + else + send_file(@path, :type => "application/octet-stream", :filename => @escaped_file_name, :x_sendfile => true) + end end #end rescue