I am uploading a file from Microsoft Powerautomate to Springboot API. Getting exception
"errorMsg": "Failed to parse multipart servlet request; nested exception is .apache.tomcat.util.http.fileupload.FileUploadException: Header section has more than 10240 bytes (maybe it is not properly terminated)"
API is working with Postman and Angular framework
API Details
@PostMapping(value = "/v1.0/import", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<Void> import(
@RequestHeader(AirportConstant.AIRPORT_HEADER) String auth,
@RequestParam("file") MultipartFile file,
@RequestParam("userId") String userId,
@RequestParam(value = "icao") String icao,
@RequestParam(value = "entity", required = false) String entity) throws GlobalException {
LOGGER.info(":: entering into import ::");
Tried with multipart boundary
----airMaster34
Content-Disposition: form-data; name=\"userId\"
check
----airMaster34
Content-Disposition: form-data; name=\"icao\"
KORD
----airMaster34
Content-Disposition: form-data; name=\"file\"; filename=\"small.ascii\"
Content-Type: application/octet-stream
<file content in byte>
----airMaster34--
Powerautomate headers details
Content-Type: multipart/form-data; boundary=--airMaster34
Query Parameter details
userId: check
icao: KORD