[wp-trac] [WordPress Trac] #49096: Allow updating attachments with new files

WordPress Trac noreply at wordpress.org
Fri Jan 3 14:55:55 UTC 2020


#49096: Allow updating attachments with new files
-------------------------+------------------------------
 Reporter:  joehoyle     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  REST API     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  rest-api
-------------------------+------------------------------

Comment (by joemcgill):

 > I think the closest example in core is the image editor, which mostly
 because it was built pre-rest-api doesn't have the image updating logic in
 an endpoint, but core does include this behaviour.

 That's a good point. However, there is one major difference in the way
 these systems work versus what you are describing. For these cases, all of
 the file editing logic happens on the server via the WP application and
 the editor sends the transformation "instructions", e.g., crop dimensions,
 rotations, etc, to an Admin-Ajax callback, which executes the instructions
 and updates the file.

 There is no place where an external editor would update an attachment file
 itself and then upload a new file (that I'm aware of). I'd be more than
 happy to see us expose more transformation options vis the REST API as a
 first step towards a fully decoupled editing experience.

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


More information about the wp-trac mailing list