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