-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Description
Juergen Hoeller opened SPR-13893 and commented
Our support for Servlet 3.0 Part
lists and arrays is unfortunately highly inconsistent with the MultipartFile
handling that it was supposed to align with. Our MultipartRequest
interface allows for access to multiple files which got uploaded under the same name; this is also what a declared MultipartFile
list/array argument would receive. However, the Servlet 3.0 HttpServletRequest.getParts
method does not retrieve parts by name but rather always returns all parts of the given request, so we accidentally called that method without any use of our specified part name... Let's make this consistent for 4.3.
Affects: 4.2.4
Issue Links:
- Spring's support for javax.servlet.http.Part vs. MultipartFile incomplete, inconsistent [SPR-10591] #15220 Spring's support for javax.servlet.http.Part vs. MultipartFile incomplete, inconsistent
- RequestPartMethodArgumentResolver should defensively handle MethodParameter nesting level and java.util.Optional access [SPR-13850] #18423 RequestPartMethodArgumentResolver should defensively handle MethodParameter nesting level and java.util.Optional access
- @RequestPart(...) MultipartFile[] does not work (List<MultipartFile works) [SPR-11353] #15978
@RequestPart
(...) MultipartFile[] does not work (List<MultipartFile works) - MultipartFile argument requires multipart request even when optional (and empty) [SPR-13849] #18422 MultipartFile argument requires multipart request even when optional (and empty)
- Allow binding all MultipartFile instances as handler method argument [SPR-17405] #21938 Allow binding all MultipartFile instances as handler method argument
Referenced from: commits b4f33ad
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug