File Upload Many- Limit the maximum of files uploaded

File Upload Many- Limit the maximum of files uploaded

solucionessoluciones Posts: 12Questions: 5Answers: 0

Hi,

In Editor,
Is there any possibility to limit the maximum of files uploaded?

For example: I just want to allow 4 images to upload

Thanks!!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 49,501Questions: 1Answers: 7,286 Site admin
    Answer ✓

    Good question. I don't think there is actually! A validator could be used for it I think, but I presume this is a single field with one-to-many images? I've added a bug to get this feature into the next release of Editor.

    Allan

  • allanallan Posts: 49,501Questions: 1Answers: 7,286 Site admin

    Little update on this: in Editor 1.9 you'll be able to do:

                ->validator( 'permission[].id', Validate::mjoinMinCount(1, 'User needs some permissions') )
                ->validator( 'permission[].id', Validate::mjoinMaxCount(4, 'No more than four selections please') )
    

    to perform validations on the number of items selected / uploaded.

    Allan

Sign In or Register to comment.