Extract filename from cleaned path (for consistent separator handling)
See gh-29486
This commit is contained in:
parent
588a70218a
commit
7d2543ed82
|
@ -304,7 +304,8 @@ public class UrlResource extends AbstractFileResolvingResource {
|
|||
@Override
|
||||
@Nullable
|
||||
public String getFilename() {
|
||||
String filename = StringUtils.getFilename(this.uri != null ? this.uri.getPath() : this.url.getPath());
|
||||
String originalPath = (this.uri != null ? this.uri.getPath() : this.url.getPath());
|
||||
String filename = StringUtils.getFilename(StringUtils.cleanPath(originalPath));
|
||||
return (filename != null ? URLDecoder.decode(filename, StandardCharsets.UTF_8) : null);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue