Private
Public Access
Add a Files section to room info listing all sent attachments (#33)
Lists files and images actually attached to sent messages in a room, newest first, with click-through to a lightbox, preview modal, or direct download depending on type. Queries through messages.image_id/file_id so an upload that was never sent doesn't show up as a phantom entry. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export function formatFileSize(bytes: number): string {
|
||||
if (bytes < 1024) return `${bytes} B`
|
||||
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`
|
||||
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`
|
||||
}
|
||||
Reference in New Issue
Block a user