How to linked/upload nested and main sub component

System Information
  • Strapi Version: 4.11.5
  • Operating System: win/mac
  • Database: postgres
  • Node Version: v16.10.0
  • NPM Version: 7.24.0
  • Yarn Version: 1.22.19

In the attached screenshot, I have a nested content-type builder component that is linked to my main content type. However, when attempting to upload files using Strapi’s default plugin API controller, while the content details are appropriately updated and the files are successfully added to the media library, the expected linkage between these uploaded files and their corresponding entries in the content type is not being established. This issue seems to stem from the lack of association between the media library files and the specific content entries within the content type configuration. any suggestion will be greatly appreciated…! thank you😄.

Currently working on the same problem, but just managed to have some sort of solution: What you have to do in the custom controller that manages your upload endpoint is this:
data: {
ref: “api::xxxxx.xxxx”,
refId: 11,
field: “fichier”,
files: {

with ref, refId, and field being the relevant data to do the linking