Force WordPress 3.3 to use Flash uploader

Is there any way to force WordPress 3.3 to use the old Flash uploader instead of the new HTML5 version? (you can read below if you care about why I want to do this…)

I’m working with someone on WordPress 3.3 whose image uploader occasionally freezes when bulk uploading large numbers of images. I’ve tried troubleshooting every way I could think of and can’t find a solution. He never had this problem before upgrading to WordPress 3.3, so I’m wondering if it is an issue with the HTML5 uploader. He doesn’t want to use the old browser uploader because he does lots of bulk uploading, so I’d like to find a way to force WordPress to use the Flash uploader.

Related posts

Leave a Reply

2 comments

  1. Context

    Searching for .swf in the Core, found this in /wp-admin/includes/media.php:

    $plupload_init = array(
        'runtimes' => 'html5,silverlight,flash,html4',
        'browse_button' => 'plupload-browse-button',
        'container' => 'plupload-upload-ui',
        'drop_element' => 'drag-drop-area',
        'file_data_name' => 'async-upload',
        'multiple_queues' => true,
        'max_file_size' => $max_upload_size . 'b',
        'url' => $upload_action_url,
        'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'),
        'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'),
        'filters' => array( array('title' => __( 'Allowed Files' ), 'extensions' => '*') ),
        'multipart' => true,
        'urlstream_upload' => true,
        'multipart_params' => $post_params
    );
    
    $plupload_init = apply_filters( 'plupload_init', $plupload_init );
    

    Solution

    Applying the following filter hook seems to do the job: (in WP 3.4.1)

    add_filter('plupload_init', 'wpse_38603_flash_uploader', 10, 1);
    
    function wpse_38603_flash_uploader( $plupload_init )
    {
        $plupload_init['runtimes'] = 'flash,html5,silverlight,html4';
        return $plupload_init;
    }