Apply StringUtils.cleanPath for Windows path compatibility

See gh-28006
This commit is contained in:
Juergen Hoeller 2022-06-14 14:02:17 +02:00
parent a14650e0dc
commit 639c047f2f
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ public interface FilePartEvent extends PartEvent {
Assert.notNull(path, "Path must not be null");
return Flux.defer(() -> {
String pathName = path.toString();
String pathName = StringUtils.cleanPath(path.toString());
MediaType contentType = MediaTypeFactory.getMediaType(pathName)
.orElse(MediaType.APPLICATION_OCTET_STREAM);
String filename = StringUtils.getFilename(pathName);