summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/attachment.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index c9c33e3d4..a6351da67 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -78,6 +78,7 @@ class Attachment < ActiveRecord::Base
if @temp_file.size > 0
if @temp_file.respond_to?(:original_filename)
self.filename = @temp_file.original_filename
+ self.filename.force_encoding("UTF-8") if filename.respond_to?(:force_encoding)
end
if @temp_file.respond_to?(:content_type)
self.content_type = @temp_file.content_type.to_s.chomp