#50595 closed defect (bug) (fixed)
REST API: Allow media edit endpoint to find remote files
Reported by: | jonsurrell | Owned by: | jonsurrell |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | REST API | Keywords: | has-patch commit |
Focuses: | rest-api | Cc: |
Description
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.
Change History (5)
This ticket was mentioned in PR #396 on WordPress/wordpress-develop by sirreal.
4 years ago
#2
- Keywords has-patch added
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.
Trac ticket: https://core.trac.wordpress.org/ticket/50595
#3
@
4 years ago
- Keywords commit added
Patch looks good. May also need to update _load_image_to_edit_path()
to look for the original_image
(when specified), but that can also be handled through the filters.
TimothyBJacobs commented on PR #396:
4 years ago
#5
Merged.
Thanks for the report @jonsurrell . Moving this to 5.5 for visibility.