有编码转换错误时,不进行转码

course_group
z9hang 11 years ago
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…
Cancel
Save