Make WordPress Core


Ignore:
Timestamp:
02/12/2015 01:32:26 AM (10 years ago)
Author:
dd32
Message:

Prevent IE9 and lower displaying the download file dialogue when attempting
to upload using the html4 Plupload handler.

The HTML4 Plupload handler uses a hidden iframe to POST the upload form, and
unfortunately Internet Explorer 9 doesn't support the application/json
content-type which wp_send_json_success() and requires text/html instead.

This partially reverts [30354], keeping the better error messages.

Merges [31429] to the 4.1 branch.
Fixes #31037.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-admin/async-upload.php

    r30649 r31430  
    3333require_once( ABSPATH . 'wp-admin/admin.php' );
    3434
     35header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
     36
    3537if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
    3638    include( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
     
    4648    wp_die( __( 'You do not have permission to upload files.' ) );
    4749}
    48 
    49 header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
    5050
    5151// just fetch the detail form for that attachment
Note: See TracChangeset for help on using the changeset viewer.