diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index 927aa1735d28fdd2b8c76c46ca4e5786d82a1c0d..c9783b9ce5d53d4f049358419f2da1f2043523fb 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -42,7 +42,7 @@ class Attachment < ActiveRecord::Base
 			if @temp_file.size > 0
 				self.filename = sanitize_filename(@temp_file.original_filename)
 				self.disk_filename = DateTime.now.strftime("%y%m%d%H%M%S") + "_" + self.filename
-				self.content_type = @temp_file.content_type.chomp
+				self.content_type = @temp_file.content_type.to_s.chomp
 				self.filesize = @temp_file.size
 			end
 		end