Cannot destructure property 'data' of 'parseBody(...)' as it is undefined

System Information
  • Strapi Version: 4.0.4
  • Operating System: Ubuntu 20.04
  • Database: Postgresql
  • Node Version: 14
  • NPM Version:
  • Yarn Version: 1.22

I’m sending a POST request to my api endpoint which creates a report with files such as photo and video. My problem is I’m using form-data on Postman since I’m doing backend and I don’t have any knowledge in frontend stuff.

I understand that the problem here is that form-data does not wrap my request body inside a data object. BUT - even after tweaking the ctx.request.body to include a data property with the correct properties, it always returns an error (the title)

I have tried doing this : = ctx.request.body

// checked if it worked (yes, it returns an object with property `data` with the fields required)

// but when i get here, it returns an error saying there is no `data` property on ctx
const response = await super.create(ctx)

anyone help me with this?

I am having the exact same error at the moment using Postman.

i’m solved same this issue with recheck json format of data

Can you please share more details about you issue, step wise :slight_smile:

I have the same problem with uploading of the files.
any help?