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

Update: I tried it with the core controller without success.

Same behaviour as the custom controller. I dont know whats the problem here. Help would be much appreciated.

Here is a screenshot with my configuration (Content types builder and Postman):

and this is my custom controller:

async customCreate(ctx) {
    console.log(ctx.is("multipart"));

    if (ctx.is("multipart")) {
      const { data, files } = parseMultipartData(ctx);
      
      const entry = await strapi.entityService.create(pageApi, {
        data: { ...data },
        files: { ...files },
      });
      
      return entry;
    }
}

Can anybody help me out?

1 Like