bug(export.identify): la clé pour declarer que le fichier a deja ete identifie [content_type] est identified, pas identify

This commit is contained in:
Martin 2023-10-10 10:20:47 +02:00
parent 2c3562e829
commit f4430cebb0
2 changed files with 3 additions and 4 deletions

View file

@ -38,8 +38,7 @@ class ArchiveUploader
end
def upload_with_active_storage
params = blob_default_params(filepath).merge(io: File.open(filepath),
identify: false)
params = blob_default_params(filepath).merge(io: File.open(filepath))
blob = ActiveStorage::Blob.create_and_upload!(**params)
return blob
end
@ -64,7 +63,7 @@ class ArchiveUploader
key: namespaced_object_key,
filename: filename,
content_type: 'application/zip',
metadata: { analyzed: true, virus_scan_result: ActiveStorage::VirusScanner::SAFE }
metadata: { analyzed: true, identified: true, virus_scan_result: ActiveStorage::VirusScanner::SAFE }
}
end

View file

@ -56,7 +56,7 @@ class ProcedureExportService
content_type: content_type(format),
identify: false,
# We generate the exports ourselves, so they are safe
metadata: { virus_scan_result: ActiveStorage::VirusScanner::SAFE }
metadata: { virus_scan_result: ActiveStorage::VirusScanner::SAFE, identified: true }
)
end