[wp-trac] [WordPress Trac] #40343: REST API - set attachment upload directory on request

WordPress Trac noreply at wordpress.org
Tue Apr 11 04:02:18 UTC 2017


#40343: REST API - set attachment upload directory on request
------------------------------+-----------------------
 Reporter:  curdin            |       Owner:
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:
Component:  REST API          |     Version:  trunk
 Severity:  normal            |  Resolution:  wontfix
 Keywords:  needs-unit-tests  |     Focuses:  rest-api
------------------------------+-----------------------
Changes (by rmccue):

 * keywords:  dev-feedback 2nd-opinion needs-unit-tests => needs-unit-tests
 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 Thanks for filing this ticket! While I understand the desire for this,
 WordPress always stores images based on the file creation time. The only
 exception to this is when uploading images attached to an existing post,
 in which case it uses the date of that post instead. Apart from this, the
 creation date for a file cannot be set anywhere.

 While there is a use-case for setting this manually, this is something
 that belongs in an import-specific API, and isn't something for the
 general-purpose API. This matches existing behaviour with things like
 GUIDs and modification times, which cannot be set manually.

 Thanks for the ticket and patch anyway!

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


More information about the wp-trac mailing list