0

Hello there JAMSTACK people.

Actually those who chose strapi JS as their headless CMS of choice.

Lets say I have an API named Post, with the following fields.

  • title : text
  • slug : text
  • cover : image
  • reference : image
  • body : long text
  • author : image

And I want to populate data and send it to the API's endpoints for 'POST' & 'PUT' methods.

Any ideas ? Thanks in advance.

PS : I know that for some reason, that's not how exactly we define collection fields' in strapi though, I did this for demonstration's sake.


Think Digital
  • 129
  • 1
  • 7
  • Please clarify the question, it is not easy to understand what you need. Explain exactly whet you need to do, when, from and what is the expected outcome. – Pablo Palacios Jul 18 '21 at 21:32
  • By "Lets say I have an API named Post, with the following fields" you mean a model? – Pablo Palacios Jul 18 '21 at 21:33
  • Yes pardon my terminology and inability to fully explain. Here's the expected output : To attach images on entry creation just like how you would do it in strapi admin panel but this time using react js. Summary if you wish: For a given model with fields as described above I want to know specifically how to do an upload request when creating the file. Please note the 2 'image datatypes' defined in the example. On an ordinary API call without files I would simple hit '/post' – Think Digital Jul 19 '21 at 05:34

0 Answers0