How does Deployment with Modeler work?

I need to implement a REST-Endpoint, that receives multipart/form-data

I use:

  • Spring Boot
  • Kotlin
  • Spring MVC

A multipart form submit with the following parts:

deployment-name ----- text/plain

enable-duplicate-filtering ----- text/plain

deploy-changed-only ----- text/plain

deployment-source ----- text/plain

tenant-id ----- text/plain

* ----- application/octet-stream

The Rest Controller looks so:

    fun uploadDmn(
            deploymentName: String,
            enableDuplicateFiltering: String?,
            deployChangedOnly: String,
            deploymentSource: String,
            tenantId: String,
            data: MultipartFile
    ) {

For all params that works, but for the last one that doesn’t work.
I’ve tried to give a name “data”, “*”, “file” that doesn’t work.

Required request part ‘data’ is not present

The Controller doesn’t see that file.

I’ve tried too to use Retrofit:

    fun uploadDmn(
            data: MultipartFile
    ) {

But that doesn’t work too:

Parameter specified as non-null is null

How can I work with that content type? multipart/form-data

Example of Request:

Content-Disposition: form-data; name="deployment-name"

Content-Disposition: form-data; name="enable-duplicate-filtering"

Content-Disposition: form-data; name="deployment-source"

process application
Content-Disposition: form-data; name="data"; filename="test.bpmn"

<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions ...>
  <!-- BPMN 2.0 XML omitted -->

Can anyone help please?