Skip to main content

DEFAULT_MAX_ATTACHMENT_BYTES

Constant DEFAULT_MAX_ATTACHMENT_BYTES 

Source
pub const DEFAULT_MAX_ATTACHMENT_BYTES: usize = _; // 67_108_864usize
Expand description

Default ceiling on one attachment’s payload — 64 MiB.

Why this number. An attachment is a whole file: cover art or a font. A generous cover is a 4000×4000 PNG at ~20 MB; the largest fonts in circulation are CJK families at ~30 MB. 64 MiB clears both and is two orders of magnitude under the packet ceiling, which is right — an attachment is the one payload captured eagerly, at open, before a caller has asked for anything.