[wp-trac] [WordPress Trac] #40861: REST API saves attachments with absolute path for `_wp_attached_file` on Windows platforms

WordPress Trac noreply at wordpress.org
Fri Mar 2 11:15:28 UTC 2018


#40861: REST API saves attachments with absolute path for `_wp_attached_file` on
Windows platforms
----------------------------------------+------------------
 Reporter:  redcastor                   |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  5.0
Component:  REST API                    |     Version:  4.6
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------

Comment (by ocean90):

 Replying to [comment:6 bobbingwide]:
 > The second patch makes it a lot more obvious that it's difficult to use
 the REST API to create an attachment which is actually attached to
 something!

 Not sure I'm following. `wp_insert_attachment()` is a simple wrapper for
 `wp_insert_post()` without any additional filters. What's the issue you're
 seeing here?

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


More information about the wp-trac mailing list