Merge pull request #1185 from y-yoshinoya/fix_broken_issue_attachments
fix upload problem for same file name by Redmine issue attachments
This commit is contained in:
commit
515be5e95d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user