I don\'t see an option in the plupload API docs on restricting the number of files uploaded, to any number, even 1.
Doc fail? or Feature fail? If it doesn\'t exist I\'ll
After trying each of the solutions, I came up with the simplest of all -- which seems to work.
I'm using the core api and I have multi_selection set to false. Then, after the first file is selected (added) the second line of code, which I inserted into the FilesAdded event, hides the browse link. I don't think this can be done with the jquery widgets and I also have found that unless the upload link covers where the browse link is, it remains alive.
uploader.bind('FilesAdded', function(up, files) {
//line below hides button
document.getElementById("browse").style.display = "none";
var html = '';
plupload.each(files, function(file) {
html += '- ' + file.name + ' (' + plupload.formatSize(file.size) + ')
';
});
document.getElementById('filelist').innerHTML += html;
});