Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17405

Allow binding all MultipartFile instances as handler method argument

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 5.1.2
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              olivergierke Oliver Drotbohm
              Last updater:
              Spring Issuemaster
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 36 weeks, 4 days ago