2

I can’t figure out what I’m doing wrong. The upload works. The image gets added to the media library. But it's not added to the entry.

Here’s my screenshot (Postman request):

enter image description here

Zsolt Meszaros
  • 21,961
  • 19
  • 54
  • 57
Louai Kelani
  • 148
  • 1
  • 9
  • Try adding populate to your url, maybe that will solve your problem. Example here: [link](https://stackoverflow.com/questions/70249364/components-not-included-in-strapi-api-response/70251184#70251184) – IceJonas Dec 21 '21 at 09:41
  • @IceJonas thanks for response but I'm trying to create not get so that there is no queries for api endpoint of creation – Louai Kelani Dec 22 '21 at 10:31

1 Answers1

1

what I can tell from the docs is that you might need to change ref field value to api::article.article

https://docs.strapi.io/developer-docs/latest/plugins/upload.html#upload-files-related-to-an-entry

I hope this helps! I had the same issue and this resolved my issue. Strapi docs aren't the easiest to get around :(