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.data = ctx.request.body
// checked if it worked (yes, it returns an object with property `data` with the fields required)
console.log(ctx.request.body.data)
// but when i get here, it returns an error saying there is no `data` property on ctx
const response = await super.create(ctx)