WP_REST_Attachments_Controller::upload_from_data

Advertisement

Summery Summery

Handles an upload via raw POST data.

Syntax Syntax

WP_REST_Attachments_Controller::upload_from_data( array $data, array $headers )

Parameters Parameters

$data

(array) (Required) Supplied file data.

$headers

(array) (Required) HTTP headers from the request.

Return Return

(array|WP_Error) Data from wp_handle_sideload().

Source Source

File: wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.