Details

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

      Description

      When posting multiple non-file form fields with the same name, the CommonsMultipartResolver(as CommonsFileUploadSupport ) recognizes this as an array property. When posting multiple file form fields with the same name, the property value is overwritten. If the same logic would be applied, a bean could be populated with a MulitpartFile[] property.

      exmaple:

      public class Bean {
      private String aString;
      private String[] aStringArray;
      private MultipartFile aFile;
      private MulitpartFile[] aFileArray;
      }

      <form>
      <input name="aString" type="text"/>
      <input name="aStringArray" type="text"/>
      <input name="aStringArray" type="text"/>
      <input name="aFile" type="file"/>
      <input name="aFileArray" type="file"/>
      <input name="aFileArray" type="file"/>
      </form>

      if this forms is processed with the CommonsMultipartResolver, the String and String[] properties will be populated correctly (containing the two values in he array), the MultipartFile property will be filled correctly, but the MultipartFile[] property will contain only the last file.

      1. patch.txt
        6 kB
        Maarten Winkels

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          1008d 3h 29m 1 Arjen Poutsma 04/Aug/09 10:55 PM
          Resolved Resolved Reopened Reopened
          313d 8h 31m 1 Juergen Hoeller 07/Jul/10 4:49 AM
          Reopened Reopened In Progress In Progress
          1h 46m 1 Juergen Hoeller 07/Jul/10 6:35 AM
          In Progress In Progress Resolved Resolved
          62d 6h 40m 2 Juergen Hoeller 15/Aug/10 3:53 PM
          Resolved Resolved Closed Closed
          673d 11h 57m 1 Chris Beams 19/Jun/12 3:50 AM

            People

            • Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              mwinkels Maarten Winkels
              Last updater:
              Trevor Marshall
            • Votes:
              7 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 5 weeks, 6 days ago

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 1d 2.45h
                1d 2.45h