Private
Public Access
Add generic file attachments to chat messages
Messages can now carry an arbitrary file (MessageFile), parallel to the existing MessageImage feature rather than a refactor of it. Files serve with Content-Disposition: attachment to force a download and prevent an uploaded HTML/SVG from executing same-origin. No content-type allowlist, same 8MB cap as images for now (a separate size-limit redesign is tracked as its own issue). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
89be497fdb
commit
c78d7454b6
21 files changed
+697
-55
No files matched your search
@@ -62,6 +62,49 @@
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.message-file-attachment {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
background: var(--ds-surface-2);
|
||||
border: 1px solid var(--ds-border);
|
||||
border-radius: var(--radius);
|
||||
padding: 8px 12px;
|
||||
margin-bottom: 4px;
|
||||
color: var(--ds-text);
|
||||
text-decoration: none;
|
||||
max-width: min(320px, 100%);
|
||||
}
|
||||
|
||||
.message-file-attachment:hover {
|
||||
border-color: var(--ds-accent);
|
||||
}
|
||||
|
||||
.message-file-attachment svg {
|
||||
flex: none;
|
||||
color: var(--ds-muted);
|
||||
}
|
||||
|
||||
.message-file-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.message-file-name {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.message-file-size {
|
||||
font-size: 0.72rem;
|
||||
color: var(--ds-muted);
|
||||
font-family: var(--mono);
|
||||
}
|
||||
|
||||
.message-text {
|
||||
font-size: 0.88rem;
|
||||
line-height: 1.45;
|
||||
|
||||
Reference in new issue
Block a user