Skip to content

Commit 639c047

Browse files
committed
Apply StringUtils.cleanPath for Windows path compatibility
See gh-28006
1 parent a14650e commit 639c047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-web/src/main/java/org/springframework/http/codec/multipart/FilePartEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static Flux<FilePartEvent> create(String name, Path path, @Nullable Consumer<Htt
125125
Assert.notNull(path, "Path must not be null");
126126

127127
return Flux.defer(() -> {
128-
String pathName = path.toString();
128+
String pathName = StringUtils.cleanPath(path.toString());
129129
MediaType contentType = MediaTypeFactory.getMediaType(pathName)
130130
.orElse(MediaType.APPLICATION_OCTET_STREAM);
131131
String filename = StringUtils.getFilename(pathName);

0 commit comments

Comments
 (0)