Fix file upload to use actual file name rather than uploadxxx.tmp

This commit is contained in:
Greg Huber
2024-03-07 06:08:31 +00:00
parent a35cfebf5a
commit ca5e82309c
@@ -337,7 +337,7 @@ public abstract class AbstractMultiPartRequest<T> implements MultiPartRequest {
*/
public String[] getFileNames(String fieldName) {
return uploadedFiles.getOrDefault(fieldName, Collections.emptyList()).stream()
.map(file -> getCanonicalName(file.getName()))
.map(file -> getCanonicalName(file.getOriginalName()))
.toArray(String[]::new);
}