fix error

This commit is contained in:
chiu 2020-12-22 13:23:37 +08:00
parent d853f42396
commit b318ecf016
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -1,5 +1,5 @@
<% if @ext == 'pdf' %>
<%= render partial: 'viewer' %>
<%= render partial: 'archives/viewer' %>
<% else %>
<html lang="<%= I18n.locale.to_s%>" style="margin: 0em; padding: 0em; width: 100%; height: 100%; overflow: hidden; background-color: rgb(230, 230, 230);">
<head>