attachments error
This commit is contained in:
parent
9b707f2b5a
commit
8840a11a99
|
@ -59,6 +59,8 @@ class AttachmentsController < ApplicationController
|
||||||
:type => detect_content_type(@attachment),
|
:type => detect_content_type(@attachment),
|
||||||
:disposition => (@attachment.image? ? 'inline' : 'attachment')
|
:disposition => (@attachment.image? ? 'inline' : 'attachment')
|
||||||
end
|
end
|
||||||
|
rescue => e
|
||||||
|
redirect_to "http://forge.trustie.net/file_not_found.html"
|
||||||
end
|
end
|
||||||
|
|
||||||
#更新资源文件类型
|
#更新资源文件类型
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<title>文件未找到</title>
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
|
||||||
|
color:#303030;
|
||||||
|
margin:10px;
|
||||||
|
}
|
||||||
|
h1{
|
||||||
|
font-size:1.5em;
|
||||||
|
}
|
||||||
|
p{
|
||||||
|
font-size:0.8em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<h1>文件已经损坏</h1>
|
||||||
|
<p>抱歉,因文件已经损坏,请重新上传此文件.</p>
|
||||||
|
<p><a href="javascript:history.back()">Back</a></p>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue