Does WordPress support Plupload chunking when uploading asynchronously?

I'm using the Plupload library to upload audio files to my website from the front-end. Here is an example of my Plupload config:

var uploader = new plupload.Uploader({
    browse_button : 'browse',
    file_data_name : 'async-upload',
    multipart_params: {
        action : 'upload-attachment'
    },
    url : ajax_url,
    flash_swf_url : flash_swf_url,
    silverlight_xap_url : silverlight_xap_url,
    chunk_size : '200kb',
    max_retries : 3
});

My aim is to break files down into smaller 'chunks' whilst uploading. Plupload has built-in support for this.

My question

An example of server-side chuck handling is provided by Plupload. Does WordPress handle chunks server-side when uploading asynchronously or is this something I have to do myself?

Ref: http://www.plupload.com/docs/Chunking

Topic plupload library jquery Wordpress

Category Web


To the best of my knowledge, no, the async-upload process on the WordPress side does not support chunking from plupload. You can find this code in /wp-admin/async-upload.php.

To handle the uploaded file, it calls the wp_ajax_upload_attachment() function, in the ajax-actions.php file. This function refers directly to the PHP $_FILES array, meaning that the file would be completely uploaded and saved to a tmp file by PHP before WordPress is invoked. Therefore chunking is not directly supported.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.