Commit 3b6857e
feat(attachment): reject attachments larger than 1 GiB
Relay's default `max_upload_size` is 1 GiB — any attachment above that
can't be delivered, TUS or inline. Check the size when the attachment
is registered and drop oversized ones with a warn log naming the file
and the cap.
Also add an info log when a large (>= 100 MiB) attachment is attached,
so users see that it'll be routed through TUS, and fix the stale
`100 MB` unit comment on `SENTRY_LARGE_ATTACHMENT_SIZE` — the value is
100 MiB.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ea673c9 commit 3b6857e
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
161 | 174 | | |
162 | 175 | | |
163 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments