Deploy workflow by uploading bpmn diagram

Hi Team,
i tried to deploy my bpmn diagram by using endpoint in this endpoint i am uploading my bpmn diagram under body- form-data.(key , value).
but i am facing issue

org.springframework.core.codec.DecodingException: Could not find first boundary
at org.springframework.http.codec.multipart.MultipartParser$PreambleState.onComplete(MultipartParser.java:321)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
*__checkpoint ⇢ HTTP POST “/zeebe/process/deploy” [ExceptionHandlingWebHandler]
Original Stack Trace:
at org.springframework.http.codec.multipart.MultipartParser$PreambleState.onComplete(MultipartParser.java:321)

can you please help me here ?

and this is my code
@PostMapping(“/deploy”)
public Map<String, Object> deployProcesses(@RequestPart(“file”) List bpmnFiles) {
Map<String, Object> response = new HashMap<>();

    try {
        if (bpmnFiles == null || bpmnFiles.isEmpty()) {
            response.put("error", "No files provided for deployment");
            return response;
        }

        for (MultipartFile bpmnFile : bpmnFiles) {
            byte[] fileBytes = bpmnFile.getBytes();
            String fileName = bpmnFile.getOriginalFilename();

            DeploymentEvent deploymentEvent = client.newDeployCommand()
                    .addResourceBytes(fileBytes, fileName)
                    .send()
                    .join();

            log.info("BPMN diagram '{}' deployed. Deployment key: {}", fileName, deploymentEvent.getKey());

            response.put("message", "BPMN diagrams deployed");
            response.put("deploymentKey", deploymentEvent.getKey());
        }
    } catch (Exception e) {
        log.error("Error deploying BPMN diagrams: {}", e.getMessage(), e);
        response.put("error", "Error deploying BPMN diagrams");
        response.put("errorMessage", e.getMessage());
    }

    return response;
}

Hi @Supriya
Your request to your own REST controller is not correctly formatted as spring boot can’t find the boundary for the multipart form data.
This is still before actually doing the deploy with the Zeebe client.
Have a look at