I am using Sprin Boot and i need to process this type of request:
POST /post HTTP/1.0
content-type: multipart/form-data;boundary=482CFA229C8C00EBE48F4FAE633EDB4A0
content-length: 157
x-numbercomps: 1
user-agent: SAP NetWeaver Application Server (1.0;750)
host: 172.0.0.1:8080
accept-encoding: gzip
--482CFA229C8C00EBE48F4FAE633EDB4A0
Content-Type: text/plain
Content-Length: 11
X-compId: test.txt
content
--482CFA229C8C00EBE48F4FAE633EDB4A0--
Controller:
@PostMapping(value = "/**", params = {"create"}, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public String createPost(HttpServletRequest request,
@RequestParam MultipartFile... files) {
//do some staff
return "";
}
In the controller there is no error, but the number of MuiltipartFiles is 0
Without Content-Disposition Spring can not recognize MultipartFile.
Anyone have any ideas how to handle it?
Thanks.

