[wp-trac] [WordPress Trac] #40861: Rest Api create media

WordPress Trac noreply at wordpress.org
Thu May 25 12:08:12 UTC 2017


#40861: Rest Api create media
--------------------------+-----------------------------
 Reporter:  redcastor     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  4.7.5
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 On windows, create media with rest api insert the meta "_wp_attached_file"
 not correctly.
 It save the absolute path and not the relative path.

 the function "wp_slash" add backslash in windows file path.

 file: class-rest-attachements-controller.php
 line: 150
 {{{#!php
 <?php
 $id = wp_insert_post( wp_slash( (array) $attachment ), true );
 }}}

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


More information about the wp-trac mailing list