Improve clone of procedure attachements
This commit is contained in:
parent
cf6c33b9b5
commit
b7b46e9a82
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