Closed
Description
Oliver Drotbohm opened SPR-17405 and commented
For cases in which the names of the files of a multipart request are not static but need to be dynamically calculated, it would be cool if there was a MultipartFiles
object available for injection into a Spring MVC controller method similar to what we have with HttpHeaders
.
The use case is to find a JSON document under a well known parameter name in a multipart request that then in turn contains the parameter names under which to lookup the files.
Using someMethod(@RequestParam("json") SomeModel model, MultipartHttpServletRequest request)
already works but feels quite low level, especially if all you're interested in are the files.
Issue Links:
- Part list/array gets resolved to all parts in current request [SPR-13893] #18467 Part list/array gets resolved to all parts in current request
- MultipartFile argument requires multipart request even when optional (and empty) [SPR-13849] #18422 MultipartFile argument requires multipart request even when optional (and empty)
Referenced from: commits f0f1979
0 votes, 6 watchers