fix error
This commit is contained in:
parent
d853f42396
commit
b318ecf016
|
@ -12,7 +12,7 @@ class ArchivesController < ApplicationController
|
||||||
if Dir.glob(serve_path).length != 0
|
if Dir.glob(serve_path).length != 0
|
||||||
send_file(serve_path, type: "application/octet-stream")
|
send_file(serve_path, type: "application/octet-stream")
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% if @ext == 'pdf' %>
|
<% if @ext == 'pdf' %>
|
||||||
<%= render partial: 'viewer' %>
|
<%= render partial: 'archives/viewer' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<html lang="<%= I18n.locale.to_s%>" style="margin: 0em; padding: 0em; width: 100%; height: 100%; overflow: hidden; background-color: rgb(230, 230, 230);">
|
<html lang="<%= I18n.locale.to_s%>" style="margin: 0em; padding: 0em; width: 100%; height: 100%; overflow: hidden; background-color: rgb(230, 230, 230);">
|
||||||
<head>
|
<head>
|
||||||
|
|
Loading…
Reference in New Issue