KamoCRM

Accept 3 GiB attachments by streaming them to storage

FeatureMediaService
Ya
8 Agosti 2026, 02:36 UTC
Mwandishi
Kamo
Ahadi ya
9253ddc

file.getBytes() cannot represent an upload this large — a Java array stops just above 2 GiB — so every attachment past that died on an OutOfMemoryError regardless of heap, and a 1 GB one needed a 1 GB allocation to store a file Spring had already spooled to disk. The MultipartFile now goes to imaging as a re-openable source and is streamed straight through. Limits raised to match: multipart to 3GB per file (3100MB per request, so the largest allowed file is not rejected for its own boundary and headers) and media.attachments.max-bytes to 3 GiB. Multipart spools to an explicit 24Gi emptyDir rather than the container's writable layer. Tomcat max-swallow-size is now -1, so a rejected upload gets its 4xx delivered instead of a reset connection.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila kitu kinaingia kwenye tovuti yako mwenyewe. Anza kwenye mpango wa bure na usome ukurasa huu tena katika mwezi mmoja.

Kuwa Huru MileleMtazamo wa bei