MultipartFile is Null in @ModelAttribute with Spring Boot 3.3.4 but Works in 3.2.4 #42883
Labels
for: external-project
For an external project and not something we can fix
status: duplicate
A duplicate of another issue
Title:
MultipartFile is Null in @ModelAttribute with Spring Boot 3.3.4 but Works in 3.2.4
Description:
When upgrading from Spring Boot version 3.2.4 to 3.3.4, the
MultipartFile
parameter in the controller method becomesnull
. This issue does not occur in version 3.2.4, where the file is correctly received. There are no restrictions on file size or other related configurations.Steps to Reproduce
Controller Setup:
Send a POST Request:
/users
POST
multipart/form-data
imageFile
: [Attach a file]gender
: [Provide appropriate value]Observe the Behavior:
imageFile
isnull
.imageFile
is correctly received.Expected Behavior
The
MultipartFile
should be correctly populated with the uploaded file data regardless of the Spring Boot version, provided there are no size or configuration restrictions.Actual Behavior
In Spring Boot 3.3.4, the
imageFile
parameter isnull
when handling the POST request, whereas it works as expected in 3.2.4.Additional Information
Request
Looking for assistance or a fix to ensure that
MultipartFile
is correctly populated in Spring Boot 3.3.4 when using@ModelAttribute
.The text was updated successfully, but these errors were encountered: