Answer the question
In order to leave comments, you need to log in
Add image by API or POST?
Greetings.
How to specify the path to the file in api or post request?
Using "site/wp-json/wp/v2/media" I managed to create a media file and give it a name, but the photo itself did not load. I tried different attributes and types of requests, but nothing worked. I think the problem is in the correctness of specifying the path of the file to be loaded.
Request example
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question