diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 180553f..ea40595 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -12,7 +12,7 @@ class ArchivesController < ApplicationController if Dir.glob(serve_path).length != 0 send_file(serve_path, type: "application/octet-stream") else - render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found and return + render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found, :content_type => 'text/html' and return end end def index diff --git a/app/views/archives/download_file.html.erb b/app/views/archives/download_file.html.erb index d17299b..8e99379 100644 --- a/app/views/archives/download_file.html.erb +++ b/app/views/archives/download_file.html.erb @@ -1,5 +1,5 @@ <% if @ext == 'pdf' %> - <%= render partial: 'viewer' %> + <%= render partial: 'archives/viewer' %> <% else %>