1874 failed attch ios trail#415
Conversation
…th of sec-error-png canned file..
paulsolt-ofsw
left a comment
There was a problem hiding this comment.
When I tried again from iOS the file is not removed on mobile.
<test.mage.geointapps.com>
2026-4-21.ClamAV.code.review.mp4
If we don't update the lastModified data on the server, than the iOS app never attempts to update things. Something feels off around this logic for swapping to a placeholder image.
I still have the "infected" file in my local storage on iOS, and I never see the "security image".
There are a lot of changes on this PR that don't appear to be related to the actual work.
I'm a little concerned to merge this as is, because of the scope of changes, and chance for regressions.
|
Merging this PR is still a ways off. At this point, not comfortable--and won't be until there is requisite clarity and proof. Furthermore, the PR's scope is incomplete/incorrect. The |
Mobile Client Compatibility — Failed Attachment Handling (iOS/Android) #1874
Summary
This branch implements the server-side API contract for failed attachment handling following ClamAV pre-disk scanning, establishing the foundation for mobile client compatibility.
Changes Made
service/src/adapters/observations/adapters.observations.controllers.web.tsto handle ClamAV rejected attachments by storing a placeholder image (SecError.png) in place of the rejected file and returning a structured response includingcontentStored: false,error, andfailuresfieldsservice/src/assets/SecError.png— placeholder image displayed when an attachment is rejected by ClamAVpredisk-scanning-1756Response Structure on Rejection
{ "id": "", "fieldName": "", "observationFormId": "", "lastModified": "", "contentType": "", "name": "", "size": "", "oriented": "", "thumbnails": [], "contentStored": false, "url": "", "relativePath": "", "error": "File failed security scan", "failures": [ { "file": "eicar.txt", "error": "File failed security scan" } ] }Testing
eicar.txt— rejection response matches agreed structureDependencies
CLAM_AV_URLenv variable setdevelopwithpredisk-scanning-1756merged inOpen Items