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