KamoCRM

Accept 3 GiB attachments by streaming them to storage

FeatureMediaService
Shipped
8 ஆகஸ்ட், 2026 அன்று 2:36 AM UTC
Author
Kamo
Commit
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.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing