Merge pull request #4222 from tchak/improve-procedure-clone-attachements
Improve clone of procedure attachements
This commit is contained in:
commit
10a859cedf
1 changed files with 4 additions and 2 deletions
|
@ -262,8 +262,10 @@ class Procedure < ApplicationRecord
|
|||
if original_attachment.attached?
|
||||
kopy.send(attribute).attach({
|
||||
io: StringIO.new(original_attachment.download),
|
||||
filename: original_attachment.blob.filename,
|
||||
content_type: original_attachment.blob.content_type
|
||||
filename: original_attachment.filename,
|
||||
content_type: original_attachment.content_type,
|
||||
# we don't want to run virus scanner on cloned file
|
||||
metadata: { virus_scan_result: ActiveStorage::VirusScanner::SAFE }
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue