Just in case anyone is interested, I found a solution that I use as a substitute to the multiple_queues setting.

I add the following event, this will re-enable the browse and uploadbutton after all files have been uploaded, even if the server response of the last uploaded file was HTTP 404 not found!

var uploader = $('#uploader').pluploadQueue();
    uploader.bind('UploadComplete', function() {
        $('.plupload_buttons').attr('style', 'display: inline;');
        $('.plupload_upload_status').attr('style', 'display: inline;'); 
});

I'm still reporting serversided validation fails using the HTTP 404 not found header so the user gets immediate feedback if a file upload has failed, and doesn't get misled by green success icons for the duration of the upload progress.

I actually found a solution and I would love to hear what you think of it, could this cause any troubles that I don't see?

Whenever an upload fails I generate a fake 404 HTTP not found error with my PHP script using the following code:

header("HTTP/1.0 404 not found");
die('{"status" : "failed"}');

The only downside is that if the last file in queue fails, the "multiple_queues : true" option doesn't work (the upload buttons won't reappear, this only occurs when there is an error with the last file). I will look up if I can add some event that launches when uploading is done that will make the buttons appear again.

I'm now reporting about the serverside validation in JSON format and this piece of Javascript seems to do the job of detecting whether a file upload has failed:

var uploader = $('#uploader').pluploadQueue();
uploader.bind("FileUploaded", function(up, file, response) {
    var obj = jQuery.parseJSON(response.response);
    if(obj.status != 'success'){
        file.status = 4;
    }
});

However I'm not satisfied because the error icon only shows up for the failed uploads after all files are uploaded, I want the error icon to show up right after that file finished uploading, is that possible?

I got Plupload nicely running on my server using the jQuery queue widget, files are uploaded correctly and validated on the serverside using PHP.

My PHP script currently returns either 'success' or 'failure', but currently every file gets a nice green success image next to them (done.gif), however I want to inform the user with error.gif when a transfer failed the serversided validation.

Now, I'm very inexperienced with Javascript and especially AJAX, I usually do everything with jQuery so I don't understand how I can read the server response and show whether the file was uploaded successfully to the user.

By adding the following code I get an alert after every uploaded file:

var uploader = $('#uploader').pluploadQueue();
uploader.bind("FileUploaded", function(up, file, response) {
      alert("FileUploaded: " + response);
});

However the response var contains [object Object] and I don't understand how I can read out whether the script returned 'success' or 'failure'.

I guess this question is answered with ease for most of you guys so I hope you can help me along.

Thanks!

When using the html5 of html4 runtime in Firefox the browse / add files button has no hover effect, therefore the cursor shows up as type text and feels not clickable.


I tried various ways to fix it like adding this to the css code:

.plupload_add:hover {
    cursor: pointer;
}

Or:

.plupload_button:hover {
    cursor: pointer;
}

Also I tried editing one of the js files and added a mouseover to the button and I tried adding css elements using jQuery, but nothing seems to work.

I feel that this problem occurs because a div layer (with z-index 99999) is placed over the button, that div contains an input too. I also tried adding the 'cursor:pointer;' style to both this div and the input inside the div, but again no luck.

Can anyone help me make the browse button feel clickable in Firefox (3.6 & 4)?