mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
Merge pull request #893 from gregh3269/fix-STRUTS_7_0_0_M3-upload-file-name
Fix original file upload to use actual file name rather than uploadxxx.tmp
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user