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
Try this. It works fine for me.
uploader.bind('FilesAdded', function(up, files) {
if(uploader.files.length > 1)
{
uploader.removeFile(uploader.files[0]);
uploader.refresh();// must refresh for flash runtime
}
. . . resto
Idea is to test num files in current uploader object. If length is greater than 1, then just use method uploader.removeFile. Notice that argument is files[0] which is not a file id, but complete file object.
({id:"p17bqh1v4dp42gdf1gan75p16tp3", name:"gnome-globe.png", size:48456, loaded:0, percent:0, status:1})
Best regards!