Skip to content

Allow binding all MultipartFile instances as handler method argument [SPR-17405] #21938

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: commits f0f1979

0 votes, 6 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions