Added config option force_chunk_size #546

wants to merge 3 commits into


None yet

4 participants


This adds support for the config option 'force_chunk_size'. This way, the Flash runtime can be forced to adhere to the minimum chunk size. As discussed in issue #545


Hello, Your post is very cool and hopefully help me, because I am having the same problem. I have an application where it is installed and simply PLUPLOAD the system is divided into four files - example - PDF> 400 kb> divided into 4 and 4 makes requests, chunks. Please help me because I made the change advice that recommended and is still the same, always doing four ship to upload.php.

Here my config.

Thanks in advance.

// General settings
runtimes : 'gears,flash,silverlight,browserplus,html5',
url : 'upload2.php',
max_file_size : '100mb',
chunk_size : '10mb',
unique_names : true,
multipart: true,
multiple_queues: false,
force_chunk_size: false,

    filters : [
        <?php echo $tipos[$tipo]; ?>

    flash_swf_url : '../js/plupload.flash.swf',
    silverlight_xap_url : '../js/plupload.silverlight.xap'



You need to recompile the .swf-file using Flex since the Actionscript files have changed. Or download and replace your plupload.flash.swf with this version: (use the "Save as..." option from the link context menu)


I still put the amendment he breaks the file into 4, just to PDF, DOC divides it now for photos he sends up to 3 Mb normally.

I do not know if any configuration, because he did not read the PHP $ _REQUEST'm getting the data through the $ _FILES?

What is it?

Was going to edit the file to do the same thing when I saw your pull request.
Many thanks @aubrey and @Reggino !!!

Incidentally are you using the upload multi parts with s3 ? The minimum size needs to be 5mb for a single part, right?


File upload handling should be no different than the example code provided... This patch doesn't change the upload behavior.


(This is actually another issue)

Under some circumstances, Flash fails to use the FileReference after it has been selected by the user, using the Flash runtime. Flash internally throws an exception due to security setting, configuration issues or a special filesystem.

We noticed there errors in a Citrix environment, on Windows, Internet Explorer 8 where JavaScript started reporting 'unspecified errors' in the use of the external interface of the flash component. (Flash internally throws an exception in, line 335)

This patch makes the error catchable in a normal way.

Tim de Koning added some commits Jun 20, 2012
Tim de Koning Catch error when Flash fails internally (throws an Exception) and pro…
…pagate a 'normal' error to Plupload.

This may occur in corporate environments (e.g. Citrix or special file systems) where the FileReference-object in Flash cannot be used due to security- or configuration issues. (e.g. this._fileRef.load() (read local file, in line 335) throws an Excepton)
Tim de Koning Make sure some JS minifiers & builders can't mistake this comment as …
…IE conditional comment /*@


Yes we use S3, but with own custom merge script triggered after all files have uploaded, so we can use whatever chunk size we like! There is no minimum size as far as i know...

Moxiecode member

Interesting constrain. But simply catching the exception probably won't help, if Plupload doesn't fallback to the next runtime (HTML4 let's say). Is it a restriction specifically for Flash?

Moxiecode member

Thanks for the effort. However in Plupload 2 we removed that silent chunking piece. Since it really was confusing. Also runtime exceptions are now gracefully translated into Exception event in Flash itself.

@jayarjo jayarjo closed this Jan 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment