summaryrefslogtreecommitdiffstats
path: root/app/controllers/attachments_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-21 21:07:13 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-21 21:07:13 +0000
commit93690ee830321659689a23e011ec399fa7730201 (patch)
tree7dfc5a4593c49c8c80f22af147b9a4991dc8671e /app/controllers/attachments_controller.rb
parent64763bece35c76f611ceaedd243aa93cb1358344 (diff)
downloadredmine-93690ee830321659689a23e011ec399fa7730201.tar.gz
redmine-93690ee830321659689a23e011ec399fa7730201.zip
Send the content type as parameter when uploading a file.
git-svn-id: http://svn.redmine.org/redmine/trunk@13788 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/attachments_controller.rb')
-rw-r--r--app/controllers/attachments_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 924e9a186..d9357fbbd 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -86,6 +86,7 @@ class AttachmentsController < ApplicationController
@attachment = Attachment.new(:file => request.raw_post)
@attachment.author = User.current
@attachment.filename = params[:filename].presence || Redmine::Utils.random_hex(16)
+ @attachment.content_type = params[:content_type].presence
saved = @attachment.save
respond_to do |format|