From 57a3e117529ba3bf732936f53dbcb80f9a005906 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Thu, 21 Jan 2016 15:02:51 +0100 Subject: [PATCH] Content type of the uploaded file --- app/controllers/dmsf_upload_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb index e5d864cf..6077fcd8 100644 --- a/app/controllers/dmsf_upload_controller.rb +++ b/app/controllers/dmsf_upload_controller.rb @@ -3,7 +3,7 @@ # Redmine plugin for Document Management System "Features" # # Copyright (C) 2011 Vít Jonáš -# Copyright (C) 2011-15 Karel Pičman +# Copyright (C) 2011-16 Karel Pičman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -95,6 +95,7 @@ class DmsfUploadController < 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|