[wp-trac] [WordPress Trac] #50595: REST API: Allow media edit endpoint to find remote files
WordPress Trac
noreply at wordpress.org
Tue Jul 7 16:00:18 UTC 2020
#50595: REST API: Allow media edit endpoint to find remote files
--------------------------+-----------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Keywords:
Focuses: rest-api |
--------------------------+-----------------------------
The media edit endpoint introduced in
https://core.trac.wordpress.org/changeset/48291 fails to find files that
are not on the local file system, for example when using some file
replication plugins.
Use `_load_image_to_edit_path` to find remote images.
This is very similar to the approach currently in use in several places
already, e.g.
https://core.trac.wordpress.org/browser/trunk/src/wp-
admin/includes/image.php?rev=47461#L33
This fixes the issue described in
https://github.com/WordPress/gutenberg/issues/23686.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50595>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list