summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-05-16 06:29:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-05-16 06:29:52 +0000
commit7d6b3d344db870e1417fc5a08413729b60e7ce77 (patch)
tree444cc95a1754fce8bb4554a11e23f5d978346f35 /app
parent0e59482e90a788f2da7775a3fb5c51dbea7b135f (diff)
downloadredmine-7d6b3d344db870e1417fc5a08413729b60e7ce77.tar.gz
redmine-7d6b3d344db870e1417fc5a08413729b60e7ce77.zip
Add support for attaching file to WIKI pages by REST API (#14830).
Patch by Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@15415 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/wiki_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 2f174877f..10fd099e0 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -169,7 +169,7 @@ class WikiController < ApplicationController
@content.author = User.current
if @page.save_with_content(@content)
- attachments = Attachment.attach_files(@page, params[:attachments])
+ attachments = Attachment.attach_files(@page, params[:attachments] || (params[:wiki_page] && params[:wiki_page][:uploads]))
render_attachment_warning_if_needed(@page)
call_hook(:controller_wiki_edit_after_save, { :params => params, :page => @page})