Skip to content

Adopting Spring Boot Multipart Configuration for File Uploads #15644

Closed

Description

@gsartori

Feature description

Currently, file upload limits in Grails are configured as follows:

grails:
  controllers:
    upload:
      maxFileSize: 20000000
      maxRequestSize: 20000000

In Spring Boot, the equivalent configuration is:

spring:
  servlet:
    multipart:
      max-file-size: 200MB
      max-request-size: 200MB

I propose that we adopt the Spring Boot configuration properties instead.

This would provide several benefits:

  • Avoid reinventing existing functionality
  • Reduce redundant and framework-specific configuration code
  • Improve readability by allowing the use of human-friendly size units (e.g., MB instead of raw byte values)

Activity

  1. matrei commented on May 11, 2026

    @matrei
    Contributor

    I agree, and this is an easy (but breaking) change.

    If we just remove the multipartConfigElement bean registration in ControllersAutoConfiguration, the bean registration in spring-boot-servlet should replace it without any functional change.

  2. gsartori commented on May 11, 2026

    @gsartori
    ContributorAuthor

    It may fit the Grails 8 release?

  3. jdaugherty commented on May 11, 2026

    @jdaugherty
    Contributor

    Seems reasonable to submit it for 8.x. @gsartori will you put together a PR & associated changes? It would help accelerate this change.

  4. gsartori commented on May 12, 2026

    @gsartori
    ContributorAuthor
  5. jamesfredley commented on May 22, 2026

    @jamesfredley
    Contributor

    I'd love to still see the old config flow into the Spring Way, or at a min error so there is not a silent issue when upgrading with the 20 year legacy config entries.

  6. gsartori commented on Jul 22, 2026

    @gsartori
    ContributorAuthor

    @matrei @jamesfredley I've created a PR

  7. added this to the grails:8.0.0-RC1 milestone on Jul 25, 2026
  8. added a commit that references this issue on Jul 29, 2026
  9. moved this from Todo to In Progress in Apache Grailson Jul 29, 2026
  10. moved this from In Progress to Done in Apache Grailson Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions