How to upload an image via REST for a dynamic-zone component

I am currently stucked at the exact same thing. can anybody provide an example how this

files.my_component_name[the_index].attribute_name (Upload | Strapi Documentation )

works?

In my collection type the non nested media attributes are getting correctly assigned.

Example:
files.avatar does work in my formData on save the attribute avatar is filled with the new uploaded file/image.

files.todolist[0].img does not work. The file is uploaded to the media library but is not assigned to my nested field todolist[0].img while todolist is a dynamic zone and at position 0 there is a component with an attribute called img

In strapi v3 I did the exact same thing and it was working fine.

EDIT: I am using a custom controller and no create/update core controller from my entity. I am trying to get this working with my own controller logic