From ddbcf9085a948d73fc99836d4888784826ed5cf1 Mon Sep 17 00:00:00 2001 From: Hofei90 <29521028+Hofei90@users.noreply.github.com> Date: Wed, 28 Oct 2020 13:39:35 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da28f89a..0678b26d 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ You can either clone the master branch or download the latest zipped version. Be `RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf` 5. The access rights must be set for web server, example: `chown -R www-data:www-data plugins/redmine_dmsf`. -6. Restart the web server, e.g. `systemctl apache2 restart` +6. Restart the web server, e.g. `systemctl restart apache2` 7. You should configure the plugin via Redmine interface: Administration -> Plugins -> DMSF -> Configure. 8. Don't forget to grant permissions for DMSF in Administration -> Roles and permissions 9. Assign DMSF permissions to appropriate roles. From 45846ea89d031c22ea49c26f2d71a67acf510d7a Mon Sep 17 00:00:00 2001 From: y-yoshinoya Date: Fri, 30 Oct 2020 13:42:09 +0900 Subject: [PATCH 2/2] fix upload problem for same file name by Redmine issue attachments --- app/controllers/dmsf_upload_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb index e00d6eb2..fba1b671 100644 --- a/app/controllers/dmsf_upload_controller.rb +++ b/app/controllers/dmsf_upload_controller.rb @@ -70,7 +70,12 @@ class DmsfUploadController < ApplicationController if defined?(EasyExtensions) @attachment.skip_description_required = true end - saved = @attachment.save + begin + Attachment.skip_callback(:commit, :after, :reuse_existing_file_if_possible) + saved = @attachment.save + ensure + Attachment.set_callback(:commit, :after, :reuse_existing_file_if_possible) + end respond_to do |format| format.js