@@ -78,6 +78,7 class Attachment < ActiveRecord::Base | |||||
78 | if @temp_file.size > 0 |
|
78 | if @temp_file.size > 0 | |
79 | if @temp_file.respond_to?(:original_filename) |
|
79 | if @temp_file.respond_to?(:original_filename) | |
80 | self.filename = @temp_file.original_filename |
|
80 | self.filename = @temp_file.original_filename | |
|
81 | self.filename.force_encoding("UTF-8") if filename.respond_to?(:force_encoding) | |||
81 | end |
|
82 | end | |
82 | if @temp_file.respond_to?(:content_type) |
|
83 | if @temp_file.respond_to?(:content_type) | |
83 | self.content_type = @temp_file.content_type.to_s.chomp |
|
84 | self.content_type = @temp_file.content_type.to_s.chomp |
General Comments 0
You need to be logged in to leave comments.
Login now