Hello,
Sorry for the delay...
..
Sorry, but i can't help with your problem, i just made the plugin to plupload (not pluploadqueue),
Because it didn't had a way to limit I did a logic myself...
The logic is the same just make the code to Pluploadqueue..
or use plupload....
here is the entire code of the working page...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Teste - Plupload</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/smoothness/jquery-ui.css" type="text/css" />
<link rel="stylesheet" href="plupload/css/jquery.ui.plupload.css" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript" src="plupload/js/gears_init.js"></script>
<script type="text/javascript" src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script>
<script type="text/javascript" src="plupload/js/plupload.full.min.js"></script>
<script type="text/javascript" src="plupload/js/jquery.ui.plupload.min.js"></script>
<script type="text/javascript" src="plupload/js/jquery.plupload.queue.min.js"></script>
<script type="text/javascript" src="plupload/src/javascript/i18n/pt-br.js"></script>
<script type="text/javascript">
var maxfiles = 5; //edit here the number of max uploads
$(function() {
$("#uploader").plupload({
runtimes : 'flash',
url : 'plupload/upload.php',
//max_file_size : '1000mb',
max_file_count: maxfiles,
//chunk_size : '1mb', //divide o arkivo em partes de 1mb
unique_names : true,
multiple_queues : true,
multi_selection: true,
rename: true,
drop_element: 'uploader',
sortable: true,
filters : [
{title : "Arquivos de Imagens (jpg, gif, png)", extensions : "jpg,gif,png"}
],
flash_swf_url : 'plupload/js/plupload.flash.swf',
silverlight_xap_url : 'plupload/js/plupload.silverlight.xap',
init : {
FilesAdded: function(up, files) {
plupload.each(files, function(file) {
if (up.files.length > maxfiles) {
up.removeFile(file);
}
var upa = $('#uploader').plupload('getUploader');
var i = 0;
while (i<=upa.files.length) {
ultimo = upa.files.length;
if (ultimo > 1) {
if (i > 0) {
ultimo2 = ultimo - 1;
ii = i-1;
if (ultimo2 != ii) {
if (up.files[ultimo - 1].name == upa.files[i-1].name) {
up.removeFile(file);
}
}
}
}
i++;
}
});
if (up.files.length >= maxfiles) {
$('#uploader_browse').hide("slow");
}
},
FilesRemoved: function(up, files) {
if (up.files.length < maxfiles) {
$('#uploader_browse').fadeIn("slow");
}
}
}
});
$('form').submit(function(e) {
var uploader = $('#uploader').plupload('getUploader');
if (uploader.total.uploaded == 0) {
if (uploader.files.length > 0) {
uploader.bind('UploadProgress', function() {
if (uploader.total.uploaded == uploader.files.length)
$('form').submit();
});
uploader.start();
} else
alert('You must at least upload one file.');
e.preventDefault();
}
});
});
</script>
</head>
<body>
<h1>MultiUpload</h1>
<form method="post" action="sendimages.php">
<div id="uploader" style="width:500px;">
<p>You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.</p>
</div>
<input type="hidden" value="action" name="hid" /><br />
<input type="submit" name="enviaf" value="Enviar" />
</form>
</body>
</html>
i'ts in portuguese-brazil (where i'm from)..
hope i helped... bye