correctif(export): lorsqu'un export .zip fait plus de 4Go, le fait de l'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:
Martin 2023-10-03 11:21:12 +02:00
parent 6abd0f8db0
commit a2e6727b4b
2 changed files with 2 additions and 7 deletions

View file

@ -50,7 +50,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

View file

@ -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