I've set a file size limit of 10 MB with a plupload instance and I'd like to generate a single error message for any files being too large when a user selects multiple files.

I know I can generate an error for each oversized file individually, but I need to prompt the user with an alert and if they select many oversized files they would end up with a whole bunch of alerts popping up one after the other.  So the solution seems to be to collect any oversized files that were selected and then report the errors one time after plupload is done processing potential files.

This seems to be a bit tricky.  I've half solve the problem but can't figure out a way to deal with all cases.  Consider these two use cases:

1. The user selects a number of files of which a subset are oversized.  Each oversized file can be added to an array by code in my 'Error' callback.  Then when the 'FilesAdded' callback is called I can check the length of the oversized files array and report that some of the files were too large and will not be uploaded.  So I've taken care of this case.

2. The user selects one or more files and they are all oversized.  In this case I can add each of the files to the oversized files array, but I can't seem to find a way to determine when plupload is done processing the potential files.  The 'FilesAdded' callback never gets called as no files are actually added to the queue.  Similarly the 'QueueChanged' callback does not get called.  So I haven't been able to solve the problem for this use case.

So are there any publicly visible properties I can observe from within the 'Error' callback to determine when the last potential file has been processed from a user's selection?

I hope I've explained the problem clearly.  Any help is appreciated.


It's been a couple of months since I did the testing.  And my test application is quite complicated.  I did test the html5 and html4 runtimes with the same application and they did block mouseDown and mouseUp as expected, flash just worked (which surprised me).  I've been using all three runtimes for a few months and living with the limitations on mouseDown and mouseUp for html5/4, flash continues to work though.

I'll try to put together a simple example I can post in the next 3 or 4 days.

I would also love to have this functionality.

By the way, I've tested event propagation on all modern browsers for html4, html5 and flash and found that, while html4 and html5 runtimes block mouse down/up event propagation, flash lets the events through.  So it is possible to catch mouse down and mouse up event by binding the appropriate event handler to the to the browse_button element for the flash runtime at least.  I haven't tested the other events mentioned by Spocke earlier or the other runtimes.


I've found an odd error when using plupload and the html5 runtime.  Haven't tested other runtimes yet.  If a user selects a file to upload but the webserver is down plupload still makes all the callbacks as if the file had uploaded correctly (i.e. UploadProgress callback reports 100% and FileUploaded callback gets called).  The browser itself reports that the post failed in the consel before any of this happens, but then the callbacks are made as if everything was normal.  The Error callback is not called most importantly.

I've tested this on Chrome and Firefox so far with the same result.  Has anyone else seen anything like this?  Am I missing something in my code?

Here is my simple test case index.html file:

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <title>Simple plupload test</title>

        <script type="text/javascript" src="http://www.google.com/jsapi"></script>
        <script type="text/javascript">
            google.load("jquery", "1.3");
        <!-- Load source versions of the plupload script files -->
        <script type="text/javascript" src="src/javascript/plupload.js"></script>
        <script type="text/javascript" src="src/javascript/plupload.html5.js"></script>

        <script type="text/javascript">
        $(function() {
            var pluploader = new plupload.Uploader({
                runtimes : 'html5',
                browse_button : 'uploadfiles_id',
                max_file_size : '10mb',
                url : '/file_upload'

            pluploader.bind('Init', function(up, params) {
                console.log("Current runtime environment: " + params.runtime);


            pluploader.bind('FilesAdded', function(up, files) {
                console.log("Starting upload.");

            pluploader.bind('UploadProgress', function(up, file) {
                console.log("Progress: " + file.name + " -> " + file.percent);

            pluploader.bind('Error', function(up, err) {
                console.log("Error: " + err.code + ", Message: " + err.message +
                            (err.file ? ", File: " + err.file.name : ""));

            pluploader.bind('FileUploaded', function(up, file, response) {
                console.log("File uploaded, File: " + file.name + ", Response: " + response.response);

    <body style="">
        <div id="uploadfiles_id" style="width:100px; background-color:red">

Do you have an example written in jquery?  Or a link to any documentation on the subject?  I've been unable to find anything, and my inspection of the source code has not been encouraging so far.


Is there any way to change the URL for an existing Uploader?  The URL is set on creation but there doesn't seem to be any way of modifying the URL after the Uploader is created.

Best Regards,

I'm trying to integrate plupload with another toolkit.  I'm using an html button that changes the background image when the button is depressed - using the mousedown and mouseup events.  This makes the button act like normal desktop UI buttons - i.e. it depresses when you click on it and returns to normal when the click is released.

I've glued plupload onto one of these buttons by inserting an id into the html elements that make up the button and then creating a plupload.Uploader with browse_button set to that id.  But of course the Uploader now seems to be catching all the mouse events preventing the button from appearing to depress and return to normal.

Is there any way to be notified by plupload that the mousedown and mouseup events have been caught so I can force my button to depress and return to normal?  Or is it possible to stop the Uploader from blocking mouse event propagation for the browse_button?

Thanks for any help,