Thread Starter
isio19
(@isio19)
I changed a few things between the Postman post and this one (for example, I had a few Application passwords to test if they were being used by the REST API).
It’s been a while since I have been on that problem, I found a solution:
Instead of using only the JS code to make the Fetch request to the rest API to insert the image, I (more precisely a colleague of mine) made a custom endpoint in the plugin.php file ( with register_rest_route() ). That endpoint would use the media_handle_upload() function that is provided by WordPress to insert the image.
So instead of fixing the problem, I basically just found a workaround.
-
This reply was modified 2 years, 10 months ago by isio19.