diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-03 17:24:58 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-03 17:24:58 +0000 |
commit | 5dd3c239d35742b586dfac2ba829782561ff4365 (patch) | |
tree | cac41fab3d110f0d84b31738cce1593f1cdb83f7 /app | |
parent | 0beafecd3bd490be646263bbbe9bce2c35bbdcb5 (diff) | |
download | redmine-5dd3c239d35742b586dfac2ba829782561ff4365.tar.gz redmine-5dd3c239d35742b586dfac2ba829782561ff4365.zip |
Fixed: error when uploading a file with no content-type specified by the browser.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1115 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/attachment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 927aa1735..c9783b9ce 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 |