mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
Fix attachment size handling and ensure non-null URLs for Android compatibility
This commit is contained in:
@@ -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',
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user