aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-12-05 15:02:15 +0000
committerLouise Crow <louise.crow@gmail.com>2012-12-05 15:02:15 +0000
commite7767fb06008509220cd187c9a9a6e230fe7db62 (patch)
tree0f2129841d8fa350f23e6fa9ccdbd238c0bd37f6
parent9735b7c11abe4cdcef473637fb5c92b04d6539fa (diff)
Use mail handler to get the content type of each email part.
-rw-r--r--app/models/incoming_message.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 464910d01..819a81e6b 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -772,7 +772,7 @@ class IncomingMessage < ActiveRecord::Base
hexdigest = Digest::MD5.hexdigest(body)
attachment = self.foi_attachments.find_or_create_by_hexdigest(:hexdigest => hexdigest)
attachment.update_attributes(:url_part_number => leaf.url_part_number,
- :content_type => leaf.content_type,
+ :content_type => MailHandler.get_content_type(leaf),
:filename => MailHandler.get_part_file_name(leaf),
:charset => leaf.charset,
:within_rfc822_subject => within_rfc822_subject,