Uploading Files Formats

Hello evreyone … There is any way to decrease uploading files formats?? By default user can upload any types of format files … I mean I want to be able upload only multimedia files(ex. .mp3,mp4,png,jpeg)

Take a look at the file access control-app, in the docs there is only an example how to block an extension but you probably can write a rule to do it the other way round:

Thanks very much… But there is any way to change this from source code , not from admin panel???

Sure the project is open source: https://github.com/nextcloud/server/issues

There is even a blacklist for .htaccess-files, this can perhaps help you to implement your idea: https://github.com/nextcloud/server/blob/b4f36d44c43aac0efdc6c70ff8e46473341a9bfe/apps/files/lib/Capabilities.php#L56-L58

Thank you very much :relaxed: ,
I try their example for zip files, It’s work for me , but a can’t write another reg.expression for a few types

Can you help me to write reg.expression for a few files?? ,

P.S , Sorry for a bad English!!!

Regular expressions are a bit cryptic in the beginning but there are a lot of tutorials. There are also many editors, where you can test your expressions against a number of strings (it takes some time, but I’d have to do that as well):