summaryrefslogtreecommitdiffstats
path: root/app/models/attachment.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-12 14:32:07 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-12 14:32:07 +0000
commit5478e5cbae986fb14dbcfad687f3d2c6b7c76c37 (patch)
tree04a4a1d89ba27485a346328e45306cdf45a19097 /app/models/attachment.rb
parent29f25601bbe19c4421cd190d73449364f7b29611 (diff)
downloadredmine-5478e5cbae986fb14dbcfad687f3d2c6b7c76c37.tar.gz
redmine-5478e5cbae986fb14dbcfad687f3d2c6b7c76c37.zip
Attachment content-type is now chomped before being saved.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@617 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/attachment.rb')
-rw-r--r--app/models/attachment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index b1a7c529f..108baf99a 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -38,7 +38,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
+ self.content_type = @temp_file.content_type.chomp
self.filesize = @temp_file.size
end
end