Limit number of files to upload in Filemanager

Is there a way I can limit the number of files the user can upload?
For instance, I would like to let the user to upload 10 files at a time, and if they select more than 10, pop up a message and prevent the uploading process.


  • edited December 2018
        on: {
            onBeforeFileAdd: function() {
                if (this.files.count()>=10)return false;

  • edited December 2018

    Thanks for your answer! @integral
    The problem with this aproach is that it will still upload the first 10 files and drop the rest.
    I would like to let the user know that there's a limit and let them choose again which files are gonna be uploaded.
    So far I found a hacky way to get the input element that the uploader uses and get the length from it. But I wonder if there's a more elegant solution.

    thanks again!!!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!