How can I set the file upload limit for uploader.

Is there any way to limit the number of files the user can upload?
For instance, I would like to let the user upload a total of 3 files. and if the uploader list contains more than 3 files then the user can get an alert message saying that "Limit reached", and prevent the uploading process and also if the list contains 3 files, the user wants to replace one file with another file by removing that file and able to upload only one more file. This is the code snippet link https://snippet.webix.com/1tzq18em.
Thank you in advance.

Comments

  • Hello, @raghukundapur4

    In the snippet, you've provided, in onBeforeFileAdd you could add a check for the number of files that will be in the uploader's body upon successful download. If this number exceeds the desired one, cancel the download and issue a corresponding message.
    Also, you could check whether the user has already made a file delete, and refuse the operation afterward.
    Please, check the snippet: https://snippet.webix.com/zzc9amir

  • Thanks a lot

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!