7

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.

1
  • Are you sure its the issue with Uploader and not the server resetting the connection or something? The fact the he does bulk uploading the new upload is designed to allow bulk uploading. – Azizur Rahman Jul 24 '12 at 16:40
2

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;
}
0
0

You could check filesize in your php.ini and increase it, this could be one reason other than that you could Try this plugin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.