fix(web): cap default images at 5 MiB

This commit is contained in:
creatixchu
2026-08-12 14:47:20 +08:00
parent 8d4c3f8a0a
commit 51dc55ec3d
15 changed files with 21 additions and 20 deletions

View File

@@ -14,6 +14,7 @@ import LocalAttachmentStore, {
describe('local attachment service', () => {
it('resolves every omitted admission limit explicitly', () => {
const service = new LocalAttachmentStore(new Context(), {})
expect(DEFAULT_MAX_IMAGE_BYTES).toBe(5 * 1024 * 1024)
expect(service.imageLimits).toEqual({
maxImageBytes: DEFAULT_MAX_IMAGE_BYTES,
maxImagesPerMessage: DEFAULT_MAX_IMAGES_PER_MESSAGE,