Fix attachment size handling and ensure non-null URLs for Android compatibility

This commit is contained in:
shuaiplus
2026-02-07 04:31:16 +08:00
parent ec9d3b889d
commit c2fc9c47c6
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -8,10 +8,10 @@ function formatAttachments(attachments: Attachment[]): any[] | null {
return attachments.map(a => ({
id: a.id,
fileName: a.fileName,
size: String(a.size),
size: Number(a.size) || 0, // Android expects Int, not String
sizeName: a.sizeName,
key: a.key,
url: null,
url: `/api/ciphers/${a.cipherId}/attachment/${a.id}`, // Android requires non-null url!
object: 'attachment',
}));
}