diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index f448d7c3..a6abf645 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -52,6 +52,8 @@ class DmsfController < ApplicationController 0 end end + + @ajax_upload_size = Setting.plugin_redmine_dmsf['dmsf_max_ajax_upload_filesize'].present? ? Setting.plugin_redmine_dmsf['dmsf_max_ajax_upload_filesize'] : 100 end def entries_operation diff --git a/app/views/dmsf/_multi_upload.html.erb b/app/views/dmsf/_multi_upload.html.erb index 792e8416..f0dae54c 100644 --- a/app/views/dmsf/_multi_upload.html.erb +++ b/app/views/dmsf/_multi_upload.html.erb @@ -25,10 +25,10 @@ <%= l(:label_file_size) %>: @@ -105,7 +105,7 @@ uploader.plupload({ runtimes : 'html5,flash,html4', url : '<%= url_for({:controller => 'dmsf_upload', :action => 'upload_file', :id => @project}) %>', - max_file_size : '<%= "#{Setting.plugin_redmine_dmsf['dmsf_max_ajax_upload_filesize']}mb" %>', + max_file_size : '<%= "#{@ajax_upload_size}mb" %>', max_file_count: '<%= Setting.plugin_redmine_dmsf['dmsf_max_file_upload'].to_i if Setting.plugin_redmine_dmsf['dmsf_max_file_upload'].to_i > 0 %>', multipart: true, multipart_params : {authenticity_token : jQuery('input[name=authenticity_token]').val()},