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 Code Snippet.
Thank you in advance.

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: Code Snippet

Thanks a lot