Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

post to /wp-json/wp/v2/media

curl --request POST 
--url http://www.yoursite.com/wp-json/wp/v2/media 
--header "cache-control: no-cache" 
--header "content-disposition: attachment; filename=tmp" 
--header "authorization: Basic d29yZHByZXNzOndvcmRwcmVzcw==" 
--header "content-type: image/png" 
--data-binary "@/home/web/tmp.png" 
--location
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #post
ADD COMMENT
Topic
Name
2+5 =