Files
hermes-web-ui/packages/server
sir1st 12e0b5ebed fix(server): raise body parser limit so avatar upload doesn't 413 (#1149)
Profile avatars are sent to /profiles/:name/avatar as base64 image data
URLs in a JSON body. The handler allows up to 1MB of raw image data,
which is ~1.37MB once base64-encoded — larger than @koa/bodyparser's
default 1mb jsonLimit, so uploads were rejected with HTTP 413 before
reaching the handler.

Set jsonLimit/textLimit to 4mb, leaving the handler's own 1MB raw-size
check as the authoritative limit (now returning a clear 400 instead of
a confusing 413).

Co-authored-by: xingzhi <chuzihao.czh@alibaba-inc.com>
2026-05-30 16:32:46 +08:00
..