Merge pull request #9552 from demarches-simplifiees/US/fix-export-with-file-bigger-than-4Go
correctif(export): lorsqu'un export .zip fait plus de 4Go, le fait del'assigner via file.attach(blob) declenche soit un identify soit un virus scanner qui par la suite le vide sur le bucket
This commit is contained in:
commit
98d483ec32
2 changed files with 2 additions and 7 deletions
|
@ -52,7 +52,7 @@ class Export < ApplicationRecord
|
|||
def compute
|
||||
load_snapshot!
|
||||
|
||||
file.attach(blob)
|
||||
file.attach(blob.signed_id) # attaching a blob directly might run identify/virus scanner and wipe it
|
||||
end
|
||||
|
||||
def since
|
||||
|
|
|
@ -14,12 +14,7 @@ class ArchiveUploader
|
|||
end
|
||||
archive.reload
|
||||
uploaded_blob.reload
|
||||
ActiveStorage::Attachment.create(
|
||||
name: 'file',
|
||||
record_type: 'Archive',
|
||||
record_id: archive.id,
|
||||
blob_id: uploaded_blob.id
|
||||
)
|
||||
archive.file.attach(uploaded_blob.signed_id) # attaching a blob directly might run identify/virus scanner and wipe it
|
||||
end
|
||||
|
||||
def blob
|
||||
|
|
Loading…
Reference in a new issue