add file size logic
add missing attachmentId fallback