Make WordPress Core


Ignore:
Timestamp:
02/12/2015 01:14:47 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,
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.

Fixes #31037 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/async-upload.php

    r30649 r31429  
    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.