Grails
  1. Grails
  2. GRAILS-8576

Custom CommonsMultipartResolver not being respected (regression)

    Details

      Description

      I can't seem to get the CommonsMultipartResolver up and running. I am using Grails 2.0.0 and inject a custom CommonsMultipartResolver implementation using the resources.groovy. I confirmed the bean is being loaded and disable the multipartResolver from the Grails controllers plugin using grails.disableCommonsMultipart = true in config. This used to work perfectly well in Grails 1.3.7.

      Key problem: multipart uploading doesn't trigger my custom multipartResolver

      Key facts:

      • grails.disableCommonsMultipart is set to true
      • using Grails 2.0.0, used to work in 1.3.7
      • multipartResolver registered using resources.groovy and confirmed being loaded
      • developer tools of browser showing multipart/formdata as content-type (and that mime-type is registered with config as well as being formdata)

        Activity

        Hide
        Fabian Gebert added a comment -

        another hint: even request.multipartFiles is null in my upload controller (that used to work under 1.3.7)

        Show
        Fabian Gebert added a comment - another hint: even request.multipartFiles is null in my upload controller (that used to work under 1.3.7)
        Hide
        Fabian Gebert added a comment -

        actually, this is not a bug, but a documentation issue. I had grails.web.disable.multipart=true but wasn't aware of the fact that this would disable the CommonsMultipartResolver... Note that the controllers plugin is still using grails.disableCommonsMultipart

        Show
        Fabian Gebert added a comment - actually, this is not a bug, but a documentation issue. I had grails.web.disable.multipart=true but wasn't aware of the fact that this would disable the CommonsMultipartResolver... Note that the controllers plugin is still using grails.disableCommonsMultipart

          People

          • Assignee:
            Unassigned
            Reporter:
            Fabian Gebert
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development