-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Affects: 2.3.1.RELEASE
Hello,
I'm working with the following controller mapping:
@PostMapping("/upload-bag-picture")
public ResponseEntity<List<BagHistoryEventDTO>> uploadBagPicture (@RequestParam("bagPictures") MultipartFile[] bagPictures, @RequestParam Long bagId) { /* ... */ }
As you can see, it's supposed to receive an array of MultipartFiles.
I noticed that when sending the request from a Rest client, no exception is being thrown when the files parameter name is different from the one set into the controller:
This request will return 200 OK without any exception:
This instead is processed partially (one file has the right name):
I don't know if this is supposed to translate into an exception, but from what I saw until now, if a parameter is required, then even if only one is missing then the request should be intercepted before entering into the method body.
In case this is normal, I will close the issue. Thanks!
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement