WP_REST_Request::get_file_params() WordPress Method
The WP_REST_Request::get_file_params() function is used to retrieve file parameters from a REST request. This function is useful for handling file uploads via the REST API.
WP_REST_Request::get_file_params() #
Retrieves multipart file parameters from the body.
Contents
Description
These are the parameters you’d typically find in $_FILES.
Return
(array) Parameter map of key to value
Source
File: wp-includes/rest-api/class-wp-rest-request.php
public function get_file_params() {
return $this->params['FILES'];
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |