The mediaUploadMiddleware
is applied to every media endpoint request
#34410
Labels
[Feature] Media
Anything that impacts the experience of managing media
REST API Interaction
Related to REST API
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Currently the
mediaUploadMiddleware
is applied to every request for/wp/v2/media
endpoint.The middleware sets
options.parse
tofalse
, which causesfetchAllMiddleware
to bail early. The latter prevents doingper_page=-1
queries for media items.I discovered this while debugging a different PR #34389 (comment).
We should update the
isMediaUploadRequest
check only to return true when the request also has thePOST
method.The text was updated successfully, but these errors were encountered: