Attachment content-type is now chomped before being saved.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@617 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-08-12 14:32:07 +00:00
parent 29f25601bb
commit 5478e5cbae
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class Attachment < ActiveRecord::Base
if @temp_file.size > 0 if @temp_file.size > 0
self.filename = sanitize_filename(@temp_file.original_filename) self.filename = sanitize_filename(@temp_file.original_filename)
self.disk_filename = DateTime.now.strftime("%y%m%d%H%M%S") + "_" + self.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 self.filesize = @temp_file.size
end end
end end