From 9723d62d16c9b593078215658cdd2f54e5a2202c Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 24 Oct 2014 09:41:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E7=BC=96=E7=A0=81=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=97=B6=EF=BC=8C=E4=B8=8D=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E8=BD=AC=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 75b87c6f0..3c815c7d8 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -56,6 +56,8 @@ class AttachmentsController < ApplicationController } format.api end + rescue Encoding::InvalidByteSequenceError => e + render :action => 'file' end def download