From d4909e53c5b18f72b60faea1efca59f460b390c5 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 6 Oct 2026 15:56:10 +0100 Subject: [PATCH] Add reactive multipart defaults with Framework's new defaults See gh-51975 --- .../autoconfigure/ReactiveMultipartProperties.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartProperties.java b/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartProperties.java index ef3372f4a1a..8bf3e51997f 100644 --- a/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartProperties.java +++ b/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartProperties.java @@ -50,16 +50,15 @@ public class ReactiveMultipartProperties { private DataSize maxHeadersSize = DataSize.ofKilobytes(10); /** - * Maximum amount of disk space allowed per part. Default is -1 which enforces no - * limits. + * Maximum amount of disk space allowed per part. Set to -1 to enforce no limits. */ - private DataSize maxDiskUsagePerPart = DataSize.ofBytes(-1); + private DataSize maxDiskUsagePerPart = DataSize.ofMegabytes(1); /** - * Maximum number of parts allowed in a given multipart request. Default is -1 which - * enforces no limits. + * Maximum number of parts allowed in a given multipart request. Set to -1 to enforce + * no limits. */ - private Integer maxParts = -1; + private Integer maxParts = 50; /** * Directory used to store file parts larger than 'maxInMemorySize'. Default is a