Is it possible to limit uploads per file type per media library directory?

Tim Valdez asked on March 30, 2023 19:34

We have a custom MVC site and four large directries for our media library flat files. Each directory has multiple subdirectories and so on to categorize uploads. Under the main "Image" directory we are having a few users upload PDF documents, and vice-versa for the "Documents" directory. I would like to add code to prevent those file extensions per whatever directory the user is attempting to upload into. Is that a possibility, and if so please give some hints as to where I need to modify the CMS code. Otherwise can I at least add big bold red text right next to the upload button that tells users that only pics/docs can be uploaded in the current directory? I would need to be able to detect which directory they are viewing at that time to show the proper message.

   Please, sign in to be able to submit a new answer.