[wp-trac] [WordPress Trac] #46311: Image upload issues in Gutenberg with IIS

WordPress Trac noreply at wordpress.org
Fri May 17 09:49:05 UTC 2019


#46311: Image upload issues in Gutenberg with IIS
--------------------------+---------------------
 Reporter:  talldanwp     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.3
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by syned):

 Just ran into this issue myself on an IIS server. Here's the response from
 the console (http://www.example.com/wp-json/wp/v2/media):

 {{{
 <head><title>Document Moved</title></head>
 <body><h1>Object Moved</h1>This document may be found <a
 HREF="http://www.example.com/wp-json/wp/v2/media/498">here</a></body>
 {"id":498,"date":"2019-05-17T10:47:33",.....}
 }}}

 HTML at the top is caused by 302 redirect in class-wp-rest-attachments-
 controller.php:206.

 {{{
 $response->header( 'Location', rest_url( sprintf( '%s/%s/%d',
 $this->namespace, $this->rest_base, $id ) ) );
 }}}

 I don't know if there is a way to prevent IIS from outputing this HTML for
 302 redirects. I tried just commenting out this line and it fixes the
 issue, but I'm not sure if it could mess things up somewhere else, so it
 might not be a good fix.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46311#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list