[wp-trac] [WordPress Trac] #31037: Uploading files through media modal causes error in < IE10

WordPress Trac noreply at wordpress.org
Fri Jan 16 15:32:30 UTC 2015


#31037: Uploading files through media modal causes error in < IE10
--------------------------+--------------------
 Reporter:  joehoyle      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.1.1
Component:  Media         |     Version:  4.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+--------------------
Description changed by SergeyBiryukov:

Old description:

> Trying to upload a file in the Media Modal in IE9 and lower triggers a
> "File Download" popup because the "async-upload.php" endpoint now returns
> `Content-Type: application/json` since 4.1. IE9 and lower don't
> understand this content-type so trigger a file download dialogue.
>
> This was discussed at some length with the introduction of the new Media
> Modal here: https://core.trac.wordpress.org/ticket/22446#comment:20 long
> story short - returning `application/json` is not usually a problem as
> jQuery automatically handles it for older versions of IE, however this
> particular request is handled by Plupload which does not handle this edge
> case.
>
> Before https://core.trac.wordpress.org/changeset/30354 this endpoint
> returned `text/html` as it's Content Type; however now
> `wp_send_json_error` and associated functions are used which triggers a
> `Content-Type` header of `application/json`.
>
> I'm not sure what versions of IE is "officially" supported, but it would
> seem right now the upload file workflow feels broken in < IE10.

New description:

 Trying to upload a file in the Media Modal in IE9 and lower triggers a
 "File Download" popup because the "async-upload.php" endpoint now returns
 `Content-Type: application/json` since 4.1. IE9 and lower don't understand
 this content-type so trigger a file download dialogue.

 This was discussed at some length with the introduction of the new Media
 Modal here: https://core.trac.wordpress.org/ticket/22446#comment:20 long
 story short - returning `application/json` is not usually a problem as
 jQuery automatically handles it for older versions of IE, however this
 particular request is handled by Plupload which does not handle this edge
 case.

 Before [30354] this endpoint returned `text/html` as it's Content Type;
 however now `wp_send_json_error` and associated functions are used which
 triggers a `Content-Type` header of `application/json`.

 I'm not sure what versions of IE is "officially" supported, but it would
 seem right now the upload file workflow feels broken in < IE10.

--

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


More information about the wp-trac mailing list