diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
index 7b20793841..606bf3a860 100644
|
a
|
b
|
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
| 288 | 288 | $response->set_status( 201 ); |
| 289 | 289 | $response->header( 'Location', rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $attachment_id ) ) ); |
| 290 | 290 | |
| | 291 | /* |
| | 292 | * Add a Link header pointing to the post-process endpoint so REST clients |
| | 293 | * can formally discover it and resume image sub-size generation if the |
| | 294 | * initial upload processing fails due to a server error. |
| | 295 | * |
| | 296 | * @since 6.8.0 |
| | 297 | */ |
| | 298 | $response->add_link( |
| | 299 | 'https://api.w.org/action-post-process', |
| | 300 | rest_url( sprintf( '%s/%s/%d/post-process', $this->namespace, $this->rest_base, $attachment_id ) ), |
| | 301 | array( 'embeddable' => false ) |
| | 302 | ); |
| | 303 | |
| 291 | 304 | return $response; |
| 292 | 305 | } |
| 293 | 306 | |