curl -X POST \ https://te*****.org/wp-json/wp/v2/media \ -H 'authorization: Basic ********' \ -H 'cache-control: no-cache' \ -H 'content-disposition: attachment; filename=\"test.jpg\"' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ -H 'postman-token: a5123717-f155-e57b-b057-3*******8' \ -F email@example.com \ -F width=640 \ -F height=427
The above CURL request is working fine for me. I am getting the media ID in response.
But, when I try to upload the image from the postman, I get the error:
Invalid file type
The recent image I upload on technoajeet.org:
Also, I have tried uploading the image by giving the file type in the header, but it did not work.
- You must be logged in to reply to this topic.