Skip to content

Commit

Permalink
Merge pull request #893 from gregh3269/fix-STRUTS_7_0_0_M3-upload-fil…
Browse files Browse the repository at this point in the history
…e-name

Fix original file upload to use actual file name rather than uploadxxx.tmp
  • Loading branch information
lukaszlenart authored Mar 8, 2024
2 parents d372707 + ca5e823 commit 4939d3c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public UploadedFile<T>[] getFile(String fieldName) {
*/
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);
}

Expand Down

0 comments on commit 4939d3c

Please sign in to comment.