[wp-trac] [WordPress Trac] #57957: Media title falsely has kebab case when inserted via REST API (e.g. in Block Editor)
WordPress Trac
noreply at wordpress.org
Fri Jun 30 17:35:30 UTC 2023
#57957: Media title falsely has kebab case when inserted via REST API (e.g. in
Block Editor)
-------------------------------------------------+-------------------------
Reporter: abitofmind | Owner:
| adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.2.3
Component: REST API | Version: 6.1.1
Severity: major | Resolution:
Keywords: has-patch has-unit-tests needs- | Focuses: rest-api
testing reporter-feedback |
-------------------------------------------------+-------------------------
Comment (by adamsilverstein):
While the unit tests passed, this didn't actually work in Gutenberg as
written: no "Content-Disposition" header is being passed.
Instead we can use the `$files` data which contains the original filename
of the uploaded file, from which we can extract the correct media title. I
have updated the PR to use this approach.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57957#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list