From 056f86caad29ca95632d9da9e1e616cd00e2349a Mon Sep 17 00:00:00 2001 From: yanxd Date: Thu, 10 Jul 2014 16:41:34 +0800 Subject: [PATCH] can't download, html. after exception return; --- app/controllers/attachments_controller.rb | 1 + public/file_not_found.html | 55 +++++++++++++++-------- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 0b2ae02b3..330e1cde6 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -61,6 +61,7 @@ class AttachmentsController < ApplicationController end rescue => e redirect_to "http://" + (Setting.host_name.to_s) +"/file_not_found.html" + return end #更新资源文件类型 diff --git a/public/file_not_found.html b/public/file_not_found.html index 5b9b8bc1d..c927e13c0 100644 --- a/public/file_not_found.html +++ b/public/file_not_found.html @@ -1,23 +1,40 @@ - + -File not found - + + File not found + + -

Sorry, this file can not be downloaded now.

-

Trustie Team.

-

Back

+
+

Sorry, this file can not be downloaded now.

+

Goto Home page

+ +
+
+

Trustie Team.

+
+
+ +