From 7d6b3d344db870e1417fc5a08413729b60e7ce77 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 16 May 2016 06:29:52 +0000 Subject: 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 --- app/controllers/wiki_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') 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}) -- cgit v1.2.3