1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 01:11:12 +00:00

fix received mail text attachment does not keep original encoding on Ruby >= 2.1 (#21742)

Contributed by Pavel Rosický.

git-svn-id: http://svn.redmine.org/redmine/trunk@15184 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2016-03-04 06:56:06 +00:00
parent e28cc10a35
commit 5414d86050

View File

@ -290,7 +290,7 @@ class MailHandler < ActionMailer::Base
email.attachments.each do |attachment|
next unless accept_attachment?(attachment)
obj.attachments << Attachment.create(:container => obj,
:file => attachment.decoded,
:file => attachment.body.decoded,
:filename => attachment.filename,
:author => user,
:content_type => attachment.mime_type)