update Attachment File
suspend fun updateAttachmentFile(attachmentUid: String, newFilePath: String, latitude: Double?, longitude: Double?): AttachmentOperationResult
Update the image/file of an attachment. This method reads the new file, calculates its hash, and only copies it if the hash differs.
Return
AttachmentOperationResult containing the updated Attachment object or error
Parameters
attachment Uid
UID of the attachment to update
new File Path
URI to the new file. Must be a valid URI with scheme: - File URI: "file:///storage/emulated/0/..." (Android) or "file:///var/mobile/..." (iOS) - Content URI: "content://media/picker/..." (Android photo picker - requires Android context) Note: Plain file system paths without URI schemes are not accepted. Content URIs are Android-specific and will fail gracefully on iOS.
latitude
Optional latitude coordinate for geo-tagging the attachment
longitude
Optional longitude coordinate for geo-tagging the attachment