Skip to content

Commit

Permalink
Merge branch '2.7.x' into 3.0.x
Browse files Browse the repository at this point in the history
Closes gh-38150
  • Loading branch information
wilkinsona committed Oct 31, 2023
2 parents cb18d87 + 020c2b3 commit 8f4ea68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ CodecCustomizer defaultPartHttpMessageReaderCustomizer(ReactiveMultipartProperti
.asInt(DataSize::toBytes)
.to(defaultPartHttpMessageReader::setMaxHeadersSize);
map.from(multipartProperties::getMaxDiskUsagePerPart)
.asInt(DataSize::toBytes)
.as(DataSize::toBytes)
.to(defaultPartHttpMessageReader::setMaxDiskUsagePerPart);
map.from(multipartProperties::getMaxParts).to(defaultPartHttpMessageReader::setMaxParts);
map.from(multipartProperties::getFileStorageDirectory)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void shouldConfigureMultipartPropertiesForDefaultReader() {
this.contextRunner
.withPropertyValues("spring.webflux.multipart.max-in-memory-size=1GB",
"spring.webflux.multipart.max-headers-size=16KB",
"spring.webflux.multipart.max-disk-usage-per-part=100MB", "spring.webflux.multipart.max-parts=7",
"spring.webflux.multipart.max-disk-usage-per-part=3GB", "spring.webflux.multipart.max-parts=7",
"spring.webflux.multipart.headers-charset:UTF_16")
.run((context) -> {
CodecCustomizer customizer = context.getBean(CodecCustomizer.class);
Expand All @@ -76,7 +76,7 @@ void shouldConfigureMultipartPropertiesForDefaultReader() {
assertThat(partReader).hasFieldOrPropertyWithValue("maxInMemorySize",
Math.toIntExact(DataSize.ofGigabytes(1).toBytes()));
assertThat(partReader).hasFieldOrPropertyWithValue("maxDiskUsagePerPart",
DataSize.ofMegabytes(100).toBytes());
DataSize.ofGigabytes(3).toBytes());
});
}

Expand Down

0 comments on commit 8f4ea68

Please sign in to comment.