- Shipped
- August 8, 2026 at 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.