有编码转换错误时,不进行转码
This commit is contained in:
parent
84e8a40174
commit
9723d62d16
|
@ -56,6 +56,8 @@ class AttachmentsController < ApplicationController
|
|||
}
|
||||
format.api
|
||||
end
|
||||
rescue Encoding::InvalidByteSequenceError => e
|
||||
render :action => 'file'
|
||||
end
|
||||
|
||||
def download
|
||||
|
|
Loading…
Reference in New Issue