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