Summery Summery
Retrieves the supported media types.
Syntax Syntax
Description Description
Media types are considered the MIME type category.
Return Return
(array) Array of supported media types.
Source Source
File: wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
);
}
$filename = self::get_filename_from_disposition( $headers['content_disposition'] );
if ( empty( $filename ) ) {
return new WP_Error(
'rest_upload_invalid_disposition',
__( 'Invalid Content-Disposition supplied. Content-Disposition needs to be formatted as `attachment; filename="image.png"` or similar.' ),
array( 'status' => 400 )
);
}
if ( ! empty( $headers['content_md5'] ) ) {
$content_md5 = array_shift( $headers['content_md5'] );
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |