gsartori opened a new pull request, #16040:
URL: https://github.com/apache/grails-core/pull/16040

   ## Description
   
   Fixes [#15644](https://github.com/apache/grails-core/issues/15644).
   
   This change delegates multipart upload configuration to Spring Boot instead 
of creating and configuring a Grails-specific `MultipartConfigElement`.
   Applications should now use the standard `spring.servlet.multipart` 
properties:
   
   ```yaml
   spring:
       servlet:
           multipart:
               max-file-size: 200MB
               max-request-size: 200MB
   ```
   
   The previous `grails.controllers.upload` configuration namespace is no 
longer supported. If legacy properties are detected, application startup fails 
with migration instructions instead of silently ignoring them.
   
   The change also:
   
   - Removes the obsolete upload constants from `grails.config.Settings`.
   - Removes the corresponding Grails configuration metadata.
   - Allows Spring Boot’s multipart auto-configuration to supply the 
`MultipartConfigElement`.
   - Makes servlet registration tolerate multipart support being disabled or 
otherwise unavailable.
   - Adopts Spring Boot’s defaults of 1 MB per file and 10 MB per multipart 
request.
   - Adds a regression test covering detection of legacy configuration.
   - Updates the uploading-files documentation and threat model with the new 
properties and defaults.
   `GrailsHibernatePersistentEntity` is not changed by these commits.
   
   ## Contributor Checklist
   
   ### Issue and Scope
   
   - [x] This PR is linked to an existing issue that has been **acknowledged or 
approved** by the project team: 
[#15644](https://github.com/apache/grails-core/issues/15644).
   - [ ] This PR addresses the **complete scope** of the linked issue.
   - [x] This PR contains a **single, focused change**.
   - [x] This PR targets the `8.0.x` major release branch, where breaking 
configuration changes are permitted.
   
   ### Code Quality
   
   - [x] I have **added or updated tests** that cover the changes introduced in 
this PR.
   - [ ] I have verified that all existing tests pass by running `./gradlew 
build --rerun-tasks`.
   - [ ] I have run `./gradlew codeStyle` and resolved any violations.
   - [x] This PR does **not** include mass reformatting, style-only changes, or 
unrelated large-scale refactoring.
   - [ ] If generative AI tooling was used, a quality model was used to ensure 
consistency with the project’s quality standards.
   
   ### Licensing and Attribution
   
   - [ ] All contributed code is provided under the Apache License 2.0.
   - [ ] I have the necessary rights to submit this contribution and confirm it 
is my own original work.
   - [ ] If generative AI tooling was used, I have followed the ASF policy and 
properly attributed its use.
   
   ### Documentation
   
   - [x] The relevant user-facing documentation has been updated.
   - [ ] The **What’s New** section of the Grails Guide has been updated.
   - [ ] The Grails 8 **Upgrade Notes** have been updated to document migration 
from `grails.controllers.upload` to `spring.servlet.multipart`.
   - [x] The PR description clearly explains **what** was changed and **why**.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to