Is there any way to set the maximum number of files, a user is allowed to upload?


It is currently not possible to set this.

I'd like to see this, too. Mostly I want to use pluploader for the drag and drop functionality, but for single-file uploads.

Does Plupload library allow this setting?

Looking through the Moxiecode Github bugs brought me to this - So it's doable, and the code looks pretty small (pasted code below). Ideally the 'max' value should be taken from the associated file field's 'number of values' value, though this won't help me directly since I'm building custom forms for my content types.

/* somewhere here plupload instance is initialized and
reference assigned to - uploader variable */
var max = 3; // max number of files
uploader.bind('FilesAdded', function(up, files) {
    if (files.length > max)
         alert('You are allowed to add only ' + max + ' files.');
    uploader.splice(); // reset the queue to zero

Version:7.x-1.1» 7.x-2.x-dev
Category:support» feature

This will probably fit in 7.x-2.x