Hi Keipidesu
I have done this with server side code to prevent uploading specific file types in Document Files tab. May be you can see whether it is useful in your case
Method Type : Server Side (C#)
Hooks : Item Type's Server Event (Here Document Files Item Type)
Method Code:
Innovator inn = this.getInnovator();
Item file = this.getRelatedItem();
string filetype = file.getProperty("file_type");
// IDs of File Types : 7z Archive, GZ Archive, MHTML Web Archive and ZIP Archive
if (filetype == "37F8C7E3B74F418FBFEE82A47D4FB58F" || filetype == "FBFF07AC45C04698981A40C292AA75F5" || filetype == "66D94C1CE5B848FFAD8B6B1C38E3035B" || filetype == "238E3419BA7648AC9F37313E84474735")
{
return inn.newError("Uploading Archive File(s) and Folders is not allowed. Please remove and save the item.");
}
return this;
Note: You can block other file types also. To get the IDs of other file types go to Administration --> File Handling --> File Types (Right click and select properties to copy the ID).
If I'm able to get this done in JavaScript, Will keep you updated here.
Thank You
Gopikrishnan R