Apply StringUtils.cleanPath for Windows path compatibility
See gh-28006
This commit is contained in:
parent
a14650e0dc
commit
639c047f2f
|
@ -125,7 +125,7 @@ public interface FilePartEvent extends PartEvent {
|
||||||
Assert.notNull(path, "Path must not be null");
|
Assert.notNull(path, "Path must not be null");
|
||||||
|
|
||||||
return Flux.defer(() -> {
|
return Flux.defer(() -> {
|
||||||
String pathName = path.toString();
|
String pathName = StringUtils.cleanPath(path.toString());
|
||||||
MediaType contentType = MediaTypeFactory.getMediaType(pathName)
|
MediaType contentType = MediaTypeFactory.getMediaType(pathName)
|
||||||
.orElse(MediaType.APPLICATION_OCTET_STREAM);
|
.orElse(MediaType.APPLICATION_OCTET_STREAM);
|
||||||
String filename = StringUtils.getFilename(pathName);
|
String filename = StringUtils.getFilename(pathName);
|
||||||
|
|
Loading…
Reference in New Issue