[wp-trac] [WordPress Trac] #55851: Document "/media" REST endpoint file upload mechanics

WordPress Trac noreply at wordpress.org
Thu May 26 22:12:49 UTC 2022

#55851: Document "/media" REST endpoint file upload mechanics
 Reporter:  tstephens    |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:  trunk
 Severity:  normal       |   Keywords:  needs-docs
  Focuses:  rest-api     |
 The REST v2 /media endpoint reference at https://developer.wordpress.org
 /rest-api/reference/media/#create-a-media-item would benefit from a
 mention of file content upload mechanics. The first technique documented
 in this gist I found:


 (set the 'Content-Disposition' HTTP header field to 'form-data;
 filename="thefile.jpg"' and send the file's content as the HTTP body data)
 ended up working for me, but it would be helpful to have official
 documentation on this embedded in or linked from the /media endpoint

Ticket URL: <https://core.trac.wordpress.org/ticket/55851>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list